Skip to content

Instantly share code, notes, and snippets.

View zph's full-sized avatar

Zander Hill zph

View GitHub Profile
readonly MARKDIR="$HOME/.marks"
if [[ ! -d $MARKDIR ]];then
mkdir $MARKDIR
fi
export MARKPATH=$MARKDIR
function jump {
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
#!/usr/bin/env ruby
class String
ENCODING_OPTS = {invalid: :replace, undef: :replace, replace: '', universal_newline: true}
def remove_non_ascii
self.encode(Encoding.find('ASCII'), ENCODING_OPTS)
end
end
def swallow_errors
(setq pivotal-api-token "YOUR_TOKEN_HERE")
(setq irc-password "YOUR_PASSWORD_HERE" )
#!/usr/bin/env ruby
def usage_and_exit
usage = <<-USAGE
Usage: git issue-patch [ISSUE_OR_PR_NUMBER]
Retrieves raw diff patch for an issue/pr on Github and executes `git apply [patch]`
(Requires either gh or hub in $PATH)
(Choose by setting export GITHUB_API_TOOL='hub' in environment)

Hey!!!

I'm thinking of a background like a terminal window example

  • With the impression that it's all old school green text, doesn't have to be legible.
  • Or a background of green zeros and ones.... something in this spirit of stuff would be awesome.

Then something like a profile of my face w/ glasses on, kinda like your current avatar & facing left like yours.

#!/usr/bin/env ruby
class String
ENCODING_OPTS = {invalid: :replace, undef: :replace, replace: '', universal_newline: true}
def remove_non_ascii
self.encode(Encoding.find('ASCII'), ENCODING_OPTS)
end
end
# @zsh_history = %x(cat ~/.zsh_history |sed 's/\xc2\x91\|\xc2\x92\|\xc2\xa0\|\xe2\x80\x8e//' 2> /dev/null).split("\n")
#!/usr/bin/env ruby
class String
ENCODING_OPTS = {invalid: :replace, undef: :replace, replace: '', universal_newline: true}
def remove_non_ascii
self.encode(Encoding.find('ASCII'), ENCODING_OPTS)
end
end
# @zsh_history = %x(cat ~/.zsh_history |sed 's/\xc2\x91\|\xc2\x92\|\xc2\xa0\|\xe2\x80\x8e//' 2> /dev/null).split("\n")
#!/usr/bin/env ruby
#
# Usage: ./git-all-commits ~/source > commits.log
# commits.log will contain all commits in following format:
# repo_name: SHA FIRSTLINE_COMMIT_MSG
require 'pathname'
dir = ARGV.dup.first
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
joycevannatta.com
winrus.com
@zph
zph / import.js
Created June 16, 2014 18:40 — forked from bkerley/import.js
var fs = require('fs');
var pg = require('pg').native;
global.Grailbird = {};
global.Grailbird.data = {};
var tweetFiles = fs.readdirSync("./data/js/tweets");
for (var f in tweetFiles) {
eval('global.'+fs.readFileSync('./data/js/tweets/'+ tweetFiles[f]));