Skip to content

Instantly share code, notes, and snippets.

View zph's full-sized avatar

Zander Hill zph

View GitHub Profile
# Compiled source #
# ###################
*.com
*.class
*.dll
*.exe
*.o
*.so
#
# # Packages #
#!/usr/bin/env bash
# Credit https://gist.github.com/kalimar/909ff4a7f8c136fc4ce4
git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
@zph
zph / git-stats
Last active August 29, 2015 14:05
#!/usr/bin/env bash
set -eou pipefail
readonly BRANCH="$1"
readonly GIT_USER="$(git config --get user.email)"
# Thanks to @eevee
git log --pretty=tformat: --numstat --author="$GIT_USER" "$BRANCH" |awk -F '\t' '/./{a+=$1;r+=$2;f[$3]=1}END{printf"%d; +%d -%d = %d\n",length(f),a,r,a-r}'
@zph
zph / Gemfile
Last active August 29, 2015 14:05
source 'https://rubygems.org'
gem 'faraday'
gem 'faraday_middleware'
gem 'environs'
gem 'pmap'
gem 'memoist'
gem 'require_all'
gem 'virtus'
#!/usr/bin/env bash
git commit -eF .git/COMMIT_EDITMSG
@zph
zph / story.md
Last active August 29, 2015 14:05
Broken Key Story

I was leaving Pittsburgh after a conference where @jessitron stood up and talked in front of a couple hundred people. (Coincidentally, I learned that Pittsburgh has a street named Kerr Rd.)

Everything was going quite nicely, beautiful weather, very few other drivers on the road, and me riding our little black motorcycle.

But motorcycles aren't very comfortable, especially when big people are on small motorcycles. I stopped at a gas station to stretch my legs and fill the gas.

But I was clumsy and broke the key in the gas tank lock :(.

# Wifi Troubleshooting for Ruby for Good
#
Issue: not being able to connect and reach initial welcome screen.
Solution:
- Remove custom DNS servers from your network settings
- On Mac, Network -> Advanced -> DNS Tab.
- Take note of what they are, write it down elsewhere
#!/usr/bin/env bash
# vim: set ft=ruby:
# This file executes as a bash script, which turns around and executes Ruby via
# the line below. The -x argument to Ruby makes it discard everything before
# the second "!ruby" shebang. This allows us to work on Linux, where the
# shebang can only have one argument so we can't directly say
# "#!/usr/bin/env ruby --disable-gems". Thanks for that, Linux.
#
# If this seems confusing, don't worry. You can treat it as a normal Ruby file
# Extracted from https://securehomes.esat.kuleuven.be/~gacar/persistent/canvas_urls.html
127.0.0.1 49winners.com
127.0.0.1 addthis.com
127.0.0.1 amazonaws.com
127.0.0.1 chatrooms.org.in
127.0.0.1 cloudflare.com
127.0.0.1 cloudfront.net
127.0.0.1 cya2.net
127.0.0.1 domainsigma.com

127.0.0.1 49winners.com 127.0.0.1 addthis.com 127.0.0.1 amazonaws.com 127.0.0.1 chatrooms.org.in 127.0.0.1 cloudflare.com 127.0.0.1 cloudfront.net 127.0.0.1 cya2.net 127.0.0.1 domainsigma.com 127.0.0.1 freecall.com 127.0.0.1 freevoipdeal.com