Skip to content

Instantly share code, notes, and snippets.

@mfowlewebs
mfowlewebs / prepare-commit-msg.sh
Created October 31, 2018 18:45 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@mfowlewebs
mfowlewebs / direnv-launch
Created July 21, 2016 15:14
~/.bin/direnv-launch
#!/bin/zsh
. ./.envrc
eval $*
process.stdin.once("readable", function(){
this.read();
function on(thing){
process.stdin.on(thing, function(){
console.log(thing)
})};
on("readable");
on("data");
on("end");
on("close");
traceroute to bad.horse (162.252.205.157), 30 hops max, 60 byte packets
1 10.67.61.254 (10.67.61.254) 1.499 ms 1.823 ms 2.367 ms
2 10.67.250.235 (10.67.250.235) 2.995 ms 2.692 ms 3.944 ms
3 209.190.211.1 (209.190.211.1) 5.302 ms 12.284 ms 13.151 ms
4 207.188.223.117 (207.188.223.117) 5.559 ms 5.841 ms 5.873 ms
5 vl103.bw6b-1112b.ss.sls.md.atlantech.net (76.76.209.141) 4.985 ms 5.259 ms 5.816 ms
6 xe-1-2-4.dr2.ss.sls.md.atlantech.net (76.76.209.229) 5.247 ms 2.578 ms 2.279 ms
7 xe-1-2-0.cr1.ss.sls.md.atlantech.net (76.76.209.53) 3.150 ms 3.515 ms 3.813 ms
8 xe-0-3-0.cr1.eqix.ash.va.atlantech.net (76.76.209.2) 3.480 ms 3.726 ms 4.057 ms
9 xe-1-2-0.ber1.eqix.ash.va.atlantech.net (76.76.211.134) 4.594 ms 4.829 ms 5.166 ms
@mfowlewebs
mfowlewebs / .zshrc
Created June 15, 2015 21:29
beginning of my hanging .zshrc
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'm:{[:lower:]}={[:upper:]}'
zstyle ':completion:*' max-errors 4
zstyle ':completion:*' prompt '%e'
zstyle :compinstall filename '/Users/matthew/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
@mfowlewebs
mfowlewebs / gist:22d02bc328ef3c3f17ab
Created February 3, 2015 19:12
window.addEventListener('resize', this.componentDidUpdate);
componentDidMount: function() {
if (typeof window !== 'undefined') {
window.addEventListener('resize', this.componentDidUpdate);
}
this.componentDidUpdate();
}.
@mfowlewebs
mfowlewebs / info.end.json
Created November 12, 2014 16:27
status report - a happy ending, new beginnings
{
"month": "11",
"num": 1446,
"link": "http:\/\/xkcd1446.org\/",
"year": "2014",
"news": "",
"safe_title": "Landing",
"transcript": "...",
"status": {
"rosetta": "in space",
@mfowlewebs
mfowlewebs / noun-project.js
Created July 8, 2014 17:24
Noun Project Demo
var OAuth = require('oauth')
// `npm install oauth` to satisfy
// website: https://github.com/ciaranj/node-oauth
var KEY = "<INSERT KEY HERE>"
var SECRET = "<INSERT SECRET HERE>"
var oauth = new OAuth.OAuth(
'http://api.thenounproject.com',
'http://api.thenounproject.com',