Skip to content

Instantly share code, notes, and snippets.

Gavin Campbell gavincampbell

View GitHub Profile
@justjanne
justjanne / Price Breakdown.md
Last active Apr 20, 2019 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:
View Price Breakdown.md

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price
@jrouleau
jrouleau / InstallHaProxy.sh
Last active Mar 21, 2019 — forked from ChrisMcKee/InstallHaProxy.sh
Amazon Linux AMI Install HAProxy From Source (1.7.0 release pre configured). chmod +x InstallHaProxy.sh then ./InstallHaProxy.sh
View InstallHaProxy.sh
#!/bin/bash
### VARIABLES ###
PRE_PACK="openssl-devel pcre-devel make gcc"
VER="1.7.0"
# Setup Colours
black='\E[30;40m'
red='\E[31;40m'
green='\E[32;40m'
@dck-jp
dck-jp / GetSlnDir.csx
Created May 19, 2016
Get SolutionDirectory @ C# Interactive in VS2015
View GetSlnDir.csx
#r "EnvDTE"
var solutionFilePath = ((EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.14.0")).Solution.FullName;
var solutionDirectory = System.IO.Path.GetDirectoryName(solutionFilePath);
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active Apr 18, 2019
Jenkinsfile idiosynchrasies with escaping and quotes
View Jenkinsfile.groovy
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@vbfox
vbfox / Dapper.fs
Last active Jan 18, 2019
Minimal dapper in F#
View Dapper.fs
module DapperFSharp =
open System.Data.SqlClient
open System.Dynamic
open System.Collections.Generic
open Dapper
let dapperQuery<'Result> (query:string) (connection:SqlConnection) =
connection.Query<'Result>(query)
let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq =
You can’t perform that action at this time.