This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # notepad $PROFILE | |
| function prompt { | |
| "PS $($executionContext.SessionState.Path.CurrentLocation)$([System.Environment]::NewLine)$('>' * ($nestedPromptLevel + 1)) "; | |
| } | |
| Set-Location C:\temp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SETUP | |
| Set-ExecutionPolicy RemoteSigned | |
| . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
| #---- TEMPORARY --- | |
| Disable-UAC | |
| # Windows | |
| choco install Microsoft-Hyper-V -source WindowsFeatures | |
| choco install Microsoft-Windows-Subsystem-Linux -source WindowsFeatures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Debug@2017' -p 1433:1433 -d microsoft/mssql-server-linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static void HelloWorld(string msg) | |
| { | |
| var lista = new List<Foo>(); | |
| for (int i = 0; i < 100; i++) | |
| { | |
| lista.Add(new Foo | |
| { | |
| Bar = $"Id: {i}" | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void HighCpu() | |
| { | |
| int percentage = 80; | |
| int duration = 15; | |
| var resetEvent = new ManualResetEventSlim(); | |
| for (int i = 0; i < Environment.ProcessorCount; i++) | |
| { | |
| var th = new Thread(() => | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // definindo módulo raiz | |
| angular.module('app', []); | |
| angular.module('app'). | |
| controller('createProductController', createProductController); | |
| angular.module('app'). | |
| controller('listProductsController', listProductsController); | |
| var apiBaseAddress = 'http://localhost:57666'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://haveibeenpwned.com/ | |
| https://www.pluralsight.com/courses/secure-account-management-fundamentals | |
| ASP.NET Core Kestrel: Adventures in building a fast web server - Damian Edwards, David Fowler | |
| https://vimeo.com/172009499 | |
| .NET Standard - Introduction | |
| https://www.youtube.com/watch?v=YI4MurjfMn8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create a form and post to _blank, this can be useful to avoid poup blocking | |
| function postForm(action, data) { | |
| var formAttrs = { | |
| action: action, | |
| target: '_blank', | |
| method: 'post' | |
| }; | |
| var form = $('<form />', formAttrs); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Recursive function to flat object | |
| function flatObject(source, destination, prefix) { | |
| destination = destination || {}; | |
| prefix = prefix || ''; | |
| var keyPrefix = prefix.length > 0 ? prefix + "." : prefix; | |
| for (var item in source) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://haacked.com/archive/2009/01/14/named-formats-redux.aspx#70485 | |
| namespace Project.Extensions.NamedFormatter | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| using System.Web; | |
| using System.Web.Routing; | |
| using System.Web.UI; |
NewerOlder