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 class Person | |
| { | |
| public Person( | |
| string firstName, | |
| string lastName, | |
| int age, | |
| IEnumerable<string> hobbies, | |
| IEnumerable<string> favouriteThings) | |
| { | |
| this.FirstName = firstName; |
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
| { | |
| "items": [ | |
| { | |
| "keys": ["alt S"], | |
| "items": [ | |
| { "keys": ["S"], "id": "SurroundWith" }, | |
| { "keys": ["F"], "id": "ReformatCode"}, | |
| { "keys": ["R"], "id": "RecentLocations", "separator-above": "" }, | |
| { "keys": ["T"], "id": "CloseContent" }, | |
| { "keys": ["U"], "id": "UnsplitAll" } |
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
| " Useful shortcuts: | |
| " | |
| " Alt-Left/Right Previous/Next tab | |
| " | |
| " | |
| " | |
| " | |
| set ignorecase "Normal searches are not case sensitive | |
| set smartcase "Over-ride case-insensitivity if the search string contains an upper case char |
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
| var clipboard = require('copy-paste'); | |
| var fs = require('fs'); | |
| var exec = require('child_process').exec; | |
| var result = ''; | |
| var searchTerm = process.argv[2]; | |
| if (!searchTerm) { | |
| console.log("No search term specified. Usage: get-branch-name string-to-search-for"); |
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
| set ignorecase "Normal searches are not case sensitive | |
| set smartcase "Over-ride case-insensitivity if the search string contains an upper case char | |
| set hlsearch "switch off with nohlsearch | |
| set nowrapscan "Stop search from wrapping at end of file | |
| set incsearch "Switch on incremental searching | |
| set clipboard=unnamed " VimTip 21: easy pasting to windows apps <http://vim.sf.net/tips/tip.php?tip_id=21> yank always copies to unnamed register, so it is available in windows clipboard for other applications. | |
| let mapleader = "\" | |
| set ignorecase | |
| set smartcase |
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
| using System; | |
| using Microsoft.Win32; | |
| public class LockToggle { | |
| public static void Main(string[] args) { | |
| // The name of the key must include a valid root. | |
| const string userRoot = "HKEY_CURRENT_USER"; | |
| const string subkey = @"Software\Microsoft\Windows\CurrentVersion\Policies\System"; | |
| const string keyName = userRoot + "\\" + subkey; |
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
| param([Int32]$value=0) | |
| $registryPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System" | |
| $Name = "DisableLockWorkstation" | |
| IF(!(Test-Path $registryPath)) | |
| { | |
| Write-Host "Cannot change the status as the key cannot be found" | |
| } | |
| ELSE | |
| { |
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://docs.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer | |
| This tool comes with Visual Studio and will help with diagnosing issues with assembly binds | |
| where .Net cannot locate an assembly at runtime. |
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
| /* Used this after McAfee decided my hard drive was "removable" and set it to read-only as per the company group policy */ | |
| /* Making it read-only made all the databases unavailable but once it was writeable again the code below fixed them */ | |
| ALTER DATABASE [my_database_name] SET SINGLE_USER WITH NO_WAIT | |
| ALTER DATABASE [my_database_name] SET EMERGENCY | |
| DBCC checkdb ([my_database_name], REPAIR_ALLOW_DATA_LOSS) | |
| ALTER DATABASE [my_database_name] SET ONLINE | |
| ALTER DATABASE [my_database_name] SET MULTI_USER WITH NO_WAIT |
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
| svn diff --diff-cmd=C:\vim\vim80\diff.exe | |
| For example. To use the one in Vim and tell it to not display any context lines use: | |
| svn diff --diff-cmd=C:\vim\vim80\diff.exe -x --context=0 |
NewerOlder