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
| # Run from Command Prompt: | |
| # START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/mkropat/e93b7bdaa04c2d56879b/raw/9eff96cf4aad061f60de314b9d973d3add278002/appscp.ps1 | |
| Set-WindowsExplorerOptions -EnableShowFileExtensions | |
| cinst 7zip.install | |
| cinst GoogleChrome | |
| cinst linqpad4.install | |
| cinst mysql |
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
| git config --global --replace-all --type=bool push.autoSetupRemote true | |
| git config --global --type=bool rebase.autoStash true | |
| git config --global --type=bool rebase.updateRefs true | |
| git config --global core.autocrlf input | |
| git config --global core.commentChar auto | |
| git config --global init.defaultBranch main | |
| git config --global pull.ff only | |
| git config --global oh-my-zsh.hide-info 1 | |
| git config --global alias.ca 'commit --amend --no-edit' |
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
| angular.module('your-module').config(['$provide', function ($provide) { | |
| $provide.decorator('$rootScope', ['$delegate', function ($delegate) { | |
| wrapMethod($delegate, '$broadcast', function (method, args) { | |
| if (isNonSystemEvent(args[0])) | |
| logCall('$broadcast', args); | |
| return method.apply(this, args); | |
| }); | |
| wrapMethod($delegate, '$emit', function (method, args) { |
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
| function wrapInDelay(obj, methodName, delay) { | |
| initialize(); | |
| wrapMethod(obj, methodName, function (method, args) { | |
| window._delayerWantsDelay = delay; | |
| var result = method.apply(this, args); | |
| delete window._delayerWantsDelay; | |
| return result; | |
| }); |
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
| <?php | |
| header('Debug-Trace-'.substr(microtime(),0,8).': ' . json_encode(debug_backtrace())); | |
| // Then in your browser just run | |
| // | |
| // console.log(JSON.stringify(<PASTE TRACE HERE>, null, 4)) |
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
| --pager=less -RS |
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
| public static class NanoLog | |
| { | |
| public static void Write(params object[] objs) | |
| { | |
| var logDir = System.Environment.GetEnvironmentVariable("SystemDrive") + @"\NanoLog"; | |
| if (!System.IO.Directory.Exists(logDir)) | |
| System.IO.Directory.CreateDirectory(logDir); | |
| var logName = typeof(NanoLog).Assembly.GetName().Name + ".debug.log"; | |
| var logPath = System.IO.Path.Combine(logDir, logName); | |
| var timestamp = System.DateTime.Now.ToString("HH:mm:ss.fff"); |
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
| public interface IKeyValueStore | |
| { | |
| T Read<T>(string key); | |
| void Write<T>(string key, T value); | |
| } | |
| public class RegistryKeyValueStore : IKeyValueStore | |
| { | |
| readonly RegistryHive _hive; | |
| readonly string _regPath; |
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
| # delete-temp-aspnet.ps1 | |
| # | |
| # Delete all files in 'Temporary ASP.NET Files' at boot | |
| param( | |
| [switch] $Clean, | |
| [switch] $Register | |
| ) | |
| if ($Register) { |
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
| $setProxy = { | |
| param($proxy) | |
| Set-Location 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | |
| Set-ItemProperty . ProxyServer $proxy | |
| Set-ItemProperty . ProxyOverride '<local>' | |
| Set-ItemProperty . ProxyEnable 1 | |
| } | |
| # You can run $setProxy as another user like so: | |
| # |