Skip to content

Instantly share code, notes, and snippets.

Dan Turner dan-turner

Block or report user

Report or block dan-turner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Microsoft.PowerShell_profile.ps1
# Load posh-git example profile
. $env:USERPROFILE'\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
# Set environment variables for Visual Studio Command Prompt
pushd 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC'
cmd /c "vcvarsall.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
@dan-turner
dan-turner / gist:f9930ddf9cf08861f0b9
Created Nov 12, 2014
LegacyAuthenticationMiddleware
View gist:f9930ddf9cf08861f0b9
using System;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Infrastructure;
using Owin;
namespace Identity.Web
@dan-turner
dan-turner / gist:9891688
Created Mar 31, 2014
ECC Certs OpenSSL
View gist:9891688
Eliptical Curve Cert
* openssl ecparam -out private.pem -name prime256v1 -genkey
* openssl req -new -key private.pem -x509 -nodes -days 365 -out public.cer
* openssl pkcs12 -export -in public.cer -inkey private.pem -out export.pfx -CSP "Microsoft Enhanced RSA and AES Cryptographic Provider"
View .gitconfig
[core]
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor
autocrlf = true
[credential]
helper = !\\\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\\\"
[user]
name = ####Your name here####
email = ####Your email here####
[merge]
tool = BeyondCompare4
View gist:3662895
[alias]
st = status
ci = commit
br = branch
co = checkout
com = checkout master
fe = fetch origin
bn = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`
rb = rebase
rbm = rebase master
@dan-turner
dan-turner / TripIt-Ad-Remover.user.js
Last active Oct 7, 2015
TripIt Ad Remover - Greasemonkey Script
View TripIt-Ad-Remover.user.js
// ==UserScript==
// @name TripIt Ad Remover
// @namespace #DanTurner
// @description For users of Tripit.
// @include http://www.tripit.com/*
// @version 1.0.1
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @homepage https://gist.github.com/dan-turner/3232415
// @updateURL https://gist.github.com/dan-turner/3232415/raw/TripIt-Ad-Remover.user.js
// ==/UserScript==
@dan-turner
dan-turner / News-Ad-Remover.user.js
Last active Oct 7, 2015
News.com.au Ad Remover - Greasemonkey Script
View News-Ad-Remover.user.js
// ==UserScript==
// @name News.com.au Ad Remover
// @namespace #DanTurner
// @description For readers of News.com.au.
// @include http://www.news.com.au/*
// @version 1.0.2
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @homepage https://gist.github.com/dan-turner/3232291
// @updateURL https://gist.github.com/dan-turner/3232291/raw/News-Ad-Remover.user.js
// ==/UserScript==
@dan-turner
dan-turner / SMH-Ad-Remover.user.js
Last active Dec 14, 2015
SMH Ad Remover - Greasemonkey Script
View SMH-Ad-Remover.user.js
// ==UserScript==
// @name SMH Ad Remover
// @namespace #DanTurner
// @description For readers of SMH.
// @include http://www.smh.com.au/*
// @version 1.0.7
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @homepage https://gist.github.com/dan-turner/3224254
// @updateURL https://gist.github.com/dan-turner/3224254/raw/SMH-Ad-Remover.user.js
// ==/UserScript==
@dan-turner
dan-turner / Outlook-NineMSN-Remover.user.js
Last active Oct 7, 2015
Outlook.com: NineMSN bar remover - Greasemonkey Script
View Outlook-NineMSN-Remover.user.js
// ==UserScript==
// @name Outlook.com Ninemsn bar remover
// @namespace #DanTurner
// @description For users of Outlook.com.
// @include https://*.mail.live.com/*
// @version 1.0.6
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @homepage https://gist.github.com/dan-turner/3223401
// @updateURL https://gist.github.com/dan-turner/3223401/raw/Outlook-NineMSN-Remover.user.js
// ==/UserScript==
You can’t perform that action at this time.