Delete stuff
hg uncommit
/hg strip
git reset --hard HEAD~1
Combine stuff
; Use Scroll Lock to swap keyboard layouts | |
; and do not let Control, Alt, or Win modifiers act on Dvorak | |
Loop { | |
If GetKeyState("ScrollLock", "T") | |
and !GetKeyState("Control") | |
and !GetKeyState("Alt") | |
and !GetKeyState("LWin") | |
and !GetKeyState("RWin") { | |
Suspend, Off | |
} else { |
; To use this script first install http://www.autohotkey.com/ | |
; ------------------------------------------------------------ | |
; | |
; This script remaps your keyboard so it is more convenient to code | |
; while under the slavery of the nordic QWERTY mapping | |
; | |
; The script will do the following | |
; * Remap alt-j, alt-k. alt-l. alt-i to become cursor movements | |
; * Remap å and ¨ to imulate the nice position of []{} on US-QWERTY | |
; * Remap alt-h to be ";\n" since that is a very frequent sequence for C#. Java, C, ... programmers |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.IO; | |
using System.Text; | |
namespace MarkDownTableReformatter | |
{ | |
class Program | |
{ |
½::Click 2 |
using System; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
namespace CSharpCompression | |
{ | |
class Program | |
{ |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var xml = GetXmlData(); | |
WriteToFiles(xml, "xml"); | |
var xsd = GetXsdData(); | |
WriteToFiles(xsd, "xsd"); | |
} | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
namespace gitafterstat | |
{ | |
/// <summary> |
Call `COMMAND` on all `.foo` files and output it to `.bar` files. | |
dir *.foo | foreach-object { $newname = $_.Name.Remove($_.Name.Length - $_.Extension.Length) + ".bar"; COMMAND -vn -n -i "$_" $newname } |