Skip to content

Instantly share code, notes, and snippets.

@hmemcpy
hmemcpy / .gitignore
Created February 12, 2016 11:47
VS default .gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
let unionCases<'a> =
FSharpType.GetUnionCases(typeof<'a>)
|> Array.map (fun x -> FSharpValue.MakeUnion(x, [||]) :?> 'a)
|> Array.toList
let deck : Deck =
(unionCases<Suit>, unionCases<Rank>) ||> cartesianProduct
@hmemcpy
hmemcpy / R# plugins
Created August 20, 2015 06:35
ReShaper plugins I'm using
CitizenMatt PreviewTab build 1.2.0 on 2015-08-07 09:38:44Z.
ConfigureAwaitChecker v9 build 0.4.0.1 on 2015-08-07 09:38:44Z.
EtherealCode ReSpeller build 4.1.9.0 on 2015-08-07 09:38:44Z.
EtherealCode ReSpellerPro build 4.1.9.0 on 2015-08-07 09:38:44Z.
JetBrains Mnemonics build 1.1.1 on 2015-08-07 09:38:44Z.
JLebosquain EnhancedTooltip build 2.3.1 on 2015-08-07 09:38:44Z.
JoarOyen ReSharper.LiveTemplates build 2.0.1.0 on 2015-08-07 09:38:44Z.
ReSharper AgentMulder build 1.2.0 on 2015-08-07 09:38:44Z.
ReSharper HeapView.R90 build 0.9.7 on 2015-08-07 09:38:44Z.
ReSharper Postfix.R90 build 2.1.1 on 2015-08-07 09:38:44Z.
@hmemcpy
hmemcpy / XD.md
Last active August 29, 2015 14:27

What am I doing wrong here?

var ns = XNamespace.Xmlns + "guid";
var doc = new XDocument(
	new XElement("root",
		new XAttribute(ns, "Guid"),
		new XElement(ns + "MyValue", "{4258b6f1-2c60-4723-8d99-a458d05104b6}")));

// doc.ToString() throws an exception: Prefix "xmlns" is reserved for use by XML.

@hmemcpy
hmemcpy / undef.md
Last active November 21, 2023 16:46
Disabling Visual Studio Git Provider

Here's how to disable the package that is responsible for loading the Git source control support in Visual Studio. Use at your own risk!

  • Create a file called devenv.pkgundef and place it next to devenv.exe in you Visual Studio's Common7\IDE (you'll need elevation for this)
  • Add the following entries to the file:
[$RootKey$\Packages\{7fe30a77-37f9-4cf2-83dd-96b207028e1b}]
[$RootKey$\SourceControlProviders\{11b8e6d7-c08b-4385-b321-321078cdd1f8}]
  • Close VS if open, open a Developer command prompt, and type devenv /updateconfiguration
@hmemcpy
hmemcpy / keybase.md
Created May 27, 2015 09:13
Keybase.io

Keybase proof

I hereby claim:

  • I am hmemcpy on github.
  • I am hmemcpy (https://keybase.io/hmemcpy) on keybase.
  • I have a public key whose fingerprint is 84D6 40BB 0374 D721 2744 9731 45E3 7E44 9CA7 AA0D

To claim this, I am signing this object:

@hmemcpy
hmemcpy / keybindings.json
Created May 5, 2015 07:57
ReSharper IntelliJ keybindings for Visual Studio Code
// ReSharper IntelliJ keybindings for Visual Studio Code
// This is a work in progress...
[
{ "key": "ctrl+b", "command": "editor.action.goToDeclaration",
"when": "editorTextFocus" },
{ "key": "alt+f7", "command": "editor.action.referenceSearch.trigger",
"when": "editorTextFocus" }
]
@hmemcpy
hmemcpy / config.cson
Last active November 30, 2015 14:34
Turn off displaying CR/LF "invisibles" in Atom
# File -> Open your Config
# add the following inside 'invisibles':
"*":
editor:
invisibles:
eol: ''
cr: ''
...
@hmemcpy
hmemcpy / Export-SvnDiff.ps1
Created December 16, 2014 11:29
Export-SvnDiff
function Export-SvnDiff($repo, $fromRevision, $toRevision, $outputDirectory)
{
$xpath = "/diff/paths/path[@kind='file' and (@item='added' or @item='modified')]"
[xml]$output = & svn diff -r $("{0}:{1}" -f $fromRevision, $toRevision) $repo --summarize --xml
$output | Select-Xml -XPath $xpath | % { $_.node."#text" } | % {
$targetFile = Resolve-FullPath (Join-Path $outputDirectory ($_ -replace $repo))
$targetDir = $targetFile | Split-Path
New-Item -Force -ItemType directory -Path $targetDir | Out-Null
& svn export -r $toRevision -q --force $_ $targetFile
@hmemcpy
hmemcpy / my-boxstarter.ps1
Last active August 29, 2015 14:08
Boxstarter script for my development machine
#development
cinst notepad2
cinst git.install
cinst poshgit
cinst jump-location
cinst beyondcompare
cinst devbox-rapidee
cinst envycoder
cinst nuget.commandline
cinst scriptcs