This file contains hidden or 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
| # git config --global core.excludesfile /usr/local/git/exclude/exclude | |
| # see http://groups.google.com/group/peepcode/browse_thread/thread/fe6f9c1fc9d6e725 | |
| # Rivals | |
| .svn | |
| .hg | |
| # Archives | |
| *.zip | |
| *.gz |
This file contains hidden or 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
| Put in (Preferences -> Key Bindings - User): | |
| { "keys": ["ctrl+tab"], "command": "next_view" }, | |
| { "keys": ["ctrl+shift+tab"], "command": "prev_view" } |
This file contains hidden or 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
| // Serve files via HTTP and perform rewrite to default HTML page if file doesn't exist | |
| // Usage: go run webserver.go index.html | |
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| "os" |
This file contains hidden or 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 python | |
| import os | |
| import shlex | |
| import struct | |
| import platform | |
| import subprocess | |
| def get_terminal_size(): | |
| """ getTerminalSize() |
This file contains hidden or 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
| # | |
| # A CORS (Cross-Origin Resouce Sharing) config for nginx | |
| # | |
| # == Purpose | |
| # | |
| # This nginx configuration enables CORS requests in the following way: | |
| # - enables CORS just for origins on a whitelist specified by a regular expression | |
| # - CORS preflight request (OPTIONS) are responded immediately | |
| # - Access-Control-Allow-Credentials=true for GET and POST requests |
This file contains hidden or 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/bash | |
| IFS=$'\n\t' | |
| set -euox pipefail | |
| CNAME="$1" | |
| FILE_PATH="$2" | |
| TMPFILE="$(mktemp)" | |
| docker exec "$CNAME" cat "$FILE_PATH" > "$TMPFILE" |