Skip to content

Instantly share code, notes, and snippets.

View psi's full-sized avatar

JD Harrington psi

  • Philadelphia, PA
View GitHub Profile
stuff
#!/usr/bin/env ruby
require 'rubygems'
require 'active_support'
if ARGV.empty?
puts "Usage: ./bin/crypt [password]"
exit
end
password = ARGV[0]
~ % dig twentyfourhourpartypeople.com
; <<>> DiG 9.8.3-P1 <<>> twentyfourhourpartypeople.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32736
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;twentyfourhourpartypeople.com. IN A
# Hubot likes popcorn
#
# brb, making popcorn
module.exports = (robot) ->
robot.hear /popcorn/i, (msg) ->
msg.send "http://gnarld.com/wp-content/uploads/2011/07/Micheal-Jackson-Thriller-Popcorn-Animated.gif"
test
blah
@psi
psi / amazon-linux.erb
Created July 6, 2012 19:56
My custom Chef bootstrap for Amazon Linux
bash -c '
<% if ENV['ROLES'].split(",").size > 1 %>
HOSTNAME_PREFIX=box
<% else %>
HOSTNAME_PREFIX=<%= ENV['ROLES'].gsub('_', '-') %>
<% end %>
yum upgrade -y
yum install -y gcc gcc-c++ make zlib-devel openssl-devel patch readline-devel
current_dir = Dir.pwd
until current_dir == ENV['HOME']
if File.exist?("#{current_dir}/.irbrc")
load "#{current_dir}/.irbrc"
break
else
current_dir = File.dirname(current_dir)
end
end
@psi
psi / shit_talk.coffee
Created October 25, 2011 23:15
Make Hubot talk shit.
# Make Hubot talk shit.
module.exports = (robot) ->
robot.hear /(fuck you|fuck off|shut up)/i, (msg) ->
incoming_msg = msg.message
if incoming_msg.text.match ///#{robot.name}///i
diss = msg.match[1]
if diss != "fuck you"
abstract (1.0.0)
actionmailer (3.0.3, 3.0.1, 3.0.0, 2.3.8, 2.3.5, 1.3.6)
actionpack (3.0.3, 3.0.1, 3.0.0, 2.3.8, 2.3.5, 1.13.6)
actionwebservice (1.2.6)
activemerchant (1.9.3, 1.9.0, 1.8.0, 1.7.2)
activemodel (3.0.3, 3.0.1, 3.0.0)
activerecord (3.0.3, 3.0.1, 3.0.0, 2.3.8, 2.3.5, 1.15.6)
activeresource (3.0.3, 3.0.1, 3.0.0, 2.3.8, 2.3.5)
activesupport (3.0.4, 3.0.3, 3.0.1, 3.0.0, 2.3.8, 2.3.5, 1.4.4)
acts_as_ferret (0.5.2, 0.5.1, 0.4.8, 0.4.4, 0.4.3)