This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
hash() { | |
if [[ $# != 1 ]]; then | |
echo "usage: hash FILE" >&2 | |
return 1 | |
fi | |
shasum "$1" | cut -f1 -d' ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"gopkg.in/yaml.v2" | |
"net/url" | |
"os" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[diff] | |
tool = diff-for-schema | |
[difftool] | |
prompt = false | |
[difftool "diff-for-schema"] | |
cmd = diff --show-function-line='^CREATE TABLE' -U1 -- "$LOCAL" "$REMOTE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devbox-register-hook() { | |
autoload add-zsh-hook | |
add-zsh-hook chpwd devbox-load-env | |
} | |
devbox-unregister-hook() { | |
autoload add-zsh-hook | |
add-zsh-hook -d chpwd devbox-load-env | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build depends on bin/homework | |
build: bin/homework | |
# bin/homework depends on all .go files in this directory tree | |
bin/homework: $(shell find . -name '*.go' -not -path './vendor/*') | |
go build -o bin/homework main.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests; | |
use WebDriver\Service\CurlService; | |
use WebDriver\Service\CurlServiceInterface; | |
/** | |
* Class WebDriverCurlService | |
* @package Tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function got-focus() { | |
echo $(date) $TTY got focus >> ~/focus.log | |
export ACTIVE=1 | |
} | |
function lost-focus() { | |
echo $(date) $TTY lost focus >> ~/focus.log | |
export ACTIVE=0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
NAME=$(basename "$0") | |
RC_DIR="$HOME/.esx" | |
HISTORY_DIR="$RC_DIR/history" | |
LAST_RESULTS_FILE="$RC_DIR/last-result.json" | |
QUERY_TEMPLATE_URL="https://gist.githubusercontent.com/marzocchi/71cc6c82eda0e0c36fb8dd36f7da92cf/raw/template.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo " | |
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080 | |
" | sudo pfctl -ef - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
set -e | |
ANSWER_FILE=$(mktemp) | |
function ask() { | |
local -a choices | |
for branch in $(git branch); do |