Skip to content

Instantly share code, notes, and snippets.

View Hunter-Dolan's full-sized avatar

Hunter Dolan Hunter-Dolan

View GitHub Profile
### Keybase proof
I hereby claim:
* I am hunter-dolan on github.
* I am hunterd (https://keybase.io/hunterd) on keybase.
* I have a public key ASBBIG0aF5GRW1t8qroUDp0j_HJ3swophUH9i02j9Qyslwo
To claim this, I am signing this object:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDL4d9d2jNYycZPrPr8PVSH5VZBO7Awg8kcvNN09WpG7iD5UXtqPSwufyY+psd3ACR3wacHwGnUAresuI/YuRm3KubeSBdGjjhFTiR2tJTsd2her0BfvLYqXhmmtprmidOOL1zSDVTXbDweSlKyOC1rRTShSed9/I8DCnoEWU4WlnckAgZ6ENKtOWWkfXHaM9f0TwX0bb26HjmPT8Ks4I6nDVwJl3QTlyKRYIuMsQ449PvnM3ZZPmlM43vf2A8/RbfhKWf9TtVy0tvrd40AHarwu0yZArLvPWOPIPV+EcUxIeLJNqz71lvGtOW3B9lhIGenkojp2SU/gXdRiY+w8Til Hunter@Hunters-Macbook-2.local
@Hunter-Dolan
Hunter-Dolan / gist:4579913
Created January 20, 2013 17:10
"Post Commit" hook to append the lolcommits image to every commit.
#!/usr/bin/env ruby
commit = `git log -1 --oneline`
hash = commit.to_s.split(" ").first
message = commit.sub("#{hash} ", "")
unless(message.gsub("\n","").end_with?(".jpg"))
`lolcommits --capture`
repopath = `git rev-parse --show-toplevel`.gsub("\n", "")
repourl = `git config --get remote.origin.url`.gsub("\n", "")
@Hunter-Dolan
Hunter-Dolan / snippit.html
Created July 23, 2012 19:08
Snippit.html
<style>#file-column p {display:none;}</style><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script>$(document).ready(function(){$("#file-column p").text($("#file-column p").text().split(".")[0]).fadeIn();});</script>
@Hunter-Dolan
Hunter-Dolan / witaphp.rb
Created July 19, 2012 20:03
What I think about PHP
a = "suc"
b = "it"
c = "end"
d = "ry"
e = "P. #{b[0].upcase}#{b[1]}"
f = "#{c[0]}ve#{d}#{b[1]}h#{b[0]}ng"
g = "#{b[1]}ha#{b[1]} ma#{c[2]}#{c[0]} #{a[0]}e#{c[1]}#{a[0]}#{c[0]}"
h = "aod"
i = "l"
j = false
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property
if currentPlace in placeWords
starters = ["The time is ", "#{nick} the time's ", "The time's ", "The time is currently ",""]
t = Time.nowp
theTime = t.strftime("%I:%M%p")
"#{starters.sample}#{theTime}in#{currentPlace}"
else
uhohReturns = ["Valid place please!", "Somewhere legit please."]
uhohReturns.sample
end
#header
width 100%
height 50px
box-shadow 0 0 14px 5px rgba(0,0,0,0.35)
background-color: rgba(254, 254, 254, 0.8);
color #444
position fixed
text-shadow 0 1px 0 #FFF
@Hunter-Dolan
Hunter-Dolan / RevItV2.rb
Created February 20, 2012 21:56
Rev it!
def crash_it
puts "thread_started"
# The lower this number the more heat your cpu will generate
count_to = 1
i = 1
count = 0
while i do
i = (i * (34634523 * 23) / 235 * 12359829835) ^ 8799889
@Hunter-Dolan
Hunter-Dolan / mypage.haml
Created December 20, 2011 02:41
Haml or HTML
%html
%head
%title My Page
%script{:src => "myscript.js"}
%body
#myDiv
%h1 Howdy!
%p Hello this is my page!