Skip to content

Instantly share code, notes, and snippets.

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAC0AAAAVuCAIAAABptCosAAAgAElEQVR4nOzdeZAk130f+N/vvZeZdXVV391zX8AMgMFBAiAp0yIlkxJoSKBtgpS1XpJaKewVFCs5LIVD8jpWQcky7ZB1xMoRUkiKoJYibYZMrUydS1MAD1CkCIowDmJmcM3VM9M9fXfXXXm89377R3b3NObC4Jjp7sH3Ex0PVVlZlS8zq3tQ9b75e9xoNAgAAAAAAAAAAAAAAAAAAAAANo7a6A4AAAAAAAAAAAAAAAAAAAAAvNUhwAEAAAAAAAAAAAAAAAAAAACwwRDgAAAAAAAAAAAAAAAAAAAAANhgCHAAAAAAAAAAAAAAAAAAAAAAbDAEOAAAAAAAAAAAAAAAAAAAAAA2GAIcAAAAAAAAAAAAAAAAAAAAABsMAQ4AAAAAAAAAAAAAAAAAAACADYYABwAAAAAAAAAAAAAAAAAAAMAGQ4ADAAAAAAAAAAAAAAAAAAAAYIMhwAEAAAAAAAAAAAAAAAAAAACwwRDgAAAAAAAAAAAAAAAAAAAAANhgCHAAAAAAAAAAAAAAAAAAAAAAbDAEOAAAAAAAAAAAAAAAAAAAAAA2GAIcAAAAAAAAAAAAAAAAAAAAABsMAQ4AAAAAAAAAAAAAAAAAAACADYYABwAAAAAAAAAAAAAAAAAAAMAGMxvdAYA3k4gQX+kxYr7SYwAAAAAAAAAAAAAAAAAAABsJAQ64SQiJFxHy4mklwyG09h8hYiJFiokVo/AMAAAAAAAAAAAAAAAAAABsLm/RAIfIxQsuW5vhGleDzYCJNTORulCBA+cKAAAAAAAAAAAAAAAAAAC2iLdWgENkpRqD5LdFVgb5L+QyZG3YX4SY8wyHMK+swULExEQIcmweQsIIawAAAAAAAAAAAAAAAAAAwFb2Vglw5GkMzsf5L4z1Xzrqf9kcwOVLOuT1OZDk2HD5WfXkY0l6PrZkvXiS1bwOUyZZ4hL2VOBCny73mY
### This file specifies server-specific parameters,
### including HTTP proxy information, HTTP timeout settings,
### and authentication settings.
###
### The currently defined server options are:
### http-proxy-host Proxy host for HTTP connection
### http-proxy-port Port number of proxy host service
### http-proxy-username Username for auth to proxy service
### http-proxy-password Password for auth to proxy service
### http-proxy-exceptions List of sites that do not use proxy
@ejhayes
ejhayes / issue.md
Created July 23, 2014 21:35
kimonolabs issue

When I make this request:

curl --include --request GET "https://www.kimonolabs.com/api/cdc6zudo?kimpath2=alabama.htm&apikey=GHidQWblK9GtdgDvZuhFgn9qD4U3dqhy"

Then I get these headers:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Wed, 23 Jul 2014 21:31:15 GMT

Etag: "-1017315174"

@ejhayes
ejhayes / import_mongo_data.sh
Created July 16, 2014 23:27
Installing mongo in OSX and importing data
#!/bin/bash
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/
# unzip data
tar -xvzf <backup file in tgz or tar.gz format>
# install mongo
brew install mongo
# create data dir
@ejhayes
ejhayes / count_lines_in_big_file.sh
Created July 15, 2014 19:18
Way to count lines in a big file that is compressed without having to decompress. Includes ability to monitor counting progress
zcat $FILENAME | pv -cN extracting -s $(gzip -l $FILENAME | awk '{ print $2 }' | tail -1) | wc -l
@ejhayes
ejhayes / setup_rails_base.sh
Last active August 29, 2015 13:57
Quick and dirty script to setup a base rails app with minimal tests and whatnot
#!/bin/bash
function info {
# Blue'ish
echo -e "\033[1;36m$1\033[0m" 1>&2
}
function error {
# Red'ish
echo -e "\033[1;35m$1\033[0m" 1>&2
@ejhayes
ejhayes / README.md
Last active November 29, 2019 14:09
Prose theme for zsh
@ejhayes
ejhayes / .gitattributes
Created November 6, 2013 23:11
Force line endings for a project to always be LF (*nix) and to automatically convert any encountered CRLF line endings to LF before making a commit. This is useful if you have a project that runs with vagrant on ubuntu, but you are doing development with windows.
* text=auto
*.jpg binary
*.gif binary
*.png binary
@ejhayes
ejhayes / grep_sed_examples.sh
Created October 14, 2013 18:35
Grep, sed usage examples.
#!/bin/bash
# Recursively find all files that match a specific pattern
# and contain a specific string inside of it
grep -rl "SEARCH_FOR_WHAT" --include="*.htm" --include="*.html" /path/to/whatever
# And perform text replacement (in-line mode)
find . | xargs sed -i 's/BEFORE/AFTER/g'
@ejhayes
ejhayes / fix_double_utf8_encoded_mysql_db.sh
Created October 10, 2013 00:24
Dealing with double utf8 encoded mysql databases.
#!/bin/bash
set -e
OPTIND=1 # Reset in case getopts has been used previously in the shell.
function warn {
# Yellow'ish
echo -e "\033[1;33m$1\033[0m" 1>&2