Skip to content

Instantly share code, notes, and snippets.

View PatrickMcDonald's full-sized avatar

Patrick McDonald PatrickMcDonald

View GitHub Profile
@pavoldecky
pavoldecky / gist:76b2f8f0cc34231490bb86dc2b35e638
Created May 8, 2022 17:07
Send messages to AZure Service Hub with REST in rest.client in VS CODE
# "rest-client.environmentVariables": {
# "local":{
# "aadV2ClientSecret":"",
# "aadV2ClientId":"",
# "aadV2TenantId":"",
# "aadV2AppUri":"",
# "namespace": "",
# "topicName": ""
# }
# }
@akimboyko
akimboyko / 01_SayHello.fsx
Last active May 28, 2023 13:00
Samples from "Actor-based Concurrency with F# and Akka.NET" http://bit.ly/FSharpAkkaNET
#time "on"
#load "Bootstrap.fsx"
open System
open Akka.Actor
open Akka.Configuration
open Akka.FSharp
open Akka.TestKit
// #Using Actor
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@fabriceleal
fabriceleal / gist:7803969
Last active February 22, 2024 09:21
Decent enough macro for exporting csvs from Excel.
' http://support.microsoft.com/kb/291296/en-us
' http://superuser.com/questions/130592/how-do-you-force-excel-to-quote-all-columns-of-a-csv-file
' - change integer to long indexing
' http://stackoverflow.com/questions/2524703/save-text-file-utf-8-encoded-with-vba
' - output utf8 content
Sub QuoteCommaExport()
' Dimension all variables.
Dim DestFile As String
Dim FileNum As Integer
@PatrickMcDonald
PatrickMcDonald / DefaultNetworkCredentials.cs
Last active March 31, 2021 07:49
Tell .NET application to use default proxy configuration
WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;
@ahmedelgabri
ahmedelgabri / Sublime Text command log
Created September 21, 2013 19:19
Log Sublime Text command in the console, very helpful when trying to figure out command you want to create shortcuts for.
sublime.log_commands(True)
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@mkchandler
mkchandler / Setting up SourceGear DiffMerge for Git.md
Last active January 13, 2022 10:44
Setup guide for making Git recognize and use SourceGear DiffMerge.
  1. Download SourceGear DiffMerge: http://sourcegear.com/diffmerge/index.html

  2. Add the following to your global .gitconfig file:

     [diff]
         tool = DiffMerge
     [difftool "DiffMerge"]
         cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' "$LOCAL" "$REMOTE"
     [merge]
    

tool = DiffMerge

@jpoehls
jpoehls / gist:2030795
Created March 13, 2012 19:02
Using CTRL+W to close tabs in Visual Studio

In Tools | Options | Keyboard...

  1. Add CTRL+W as a Global shortcut for Window.CloseDocumentWindow
  2. Remove the CTRL+W shortcut for Edit.SelectCurrentWord

The caveat to this is if you are used to using CTRL+W to select the current word. If you do, find another shortcut that works for that.