Skip to content

Instantly share code, notes, and snippets.

View leeprovoost's full-sized avatar

Lee Provoost leeprovoost

View GitHub Profile
@leeprovoost
leeprovoost / .zshrc
Created October 19, 2017 14:13
Kill running process
# from: https://github.com/kevinSuttle/dotfiles/blob/9458141f40094d96952adc7c423cbdddeb909a81/functions
function killproc() {
lsof -i TCP:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9
echo "Port" $1 "found and killed."
}
@leeprovoost
leeprovoost / .gitconfig
Created January 25, 2017 16:43
Automatically create remote git branch
git config --global push.default current
Add to your profile ~/.zshrc
export PATH=$PATH:/usr/local/go/bin
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
source ~/.zshrc
@leeprovoost
leeprovoost / asg.sh
Created June 2, 2016 07:40
Stop and Start AWS Auto Scaling Groups through CLI
#!/bin/bash
# STOP
aws autoscaling update-auto-scaling-group --auto-scaling-group-name my_asg --min-size 0 --max-size 0 --desired-capacity 0
# START
aws autoscaling update-auto-scaling-group --auto-scaling-group-name my_asg --min-size 3 --max-size 4 --desired-capacity 3
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@leeprovoost
leeprovoost / main.go
Last active August 29, 2015 14:25 — forked from danesparza/negroni-gorilla.go
Negroni with Gorilla mux subrouter
package main
import (
"fmt"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
"log"
"net/http"
)
package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
)
func main() {
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html