Skip to content

Instantly share code, notes, and snippets.

View atmos's full-sized avatar
🌴
On vacation

Corey Donohoe atmos

🌴
On vacation
View GitHub Profile
@postmodern
postmodern / http_parser.rb
Created January 15, 2011 04:39
A pure Ruby HTTP parser using Parslet.
require 'parslet'
require 'pp'
class HTTPParser < Parslet::Parser
#
# Character Classes
#
rule(:digit) { match('[0-9]') }
rule(:digits) { digit.repeat(1) }
rule(:xdigit) { digit | match('[a-fA-F]') }
@atmos
atmos / campfire.coffee
Created February 8, 2011 03:45
node 0.4.x compatible irc bot
HTTPS = require "https"
EventEmitter = require("events").EventEmitter
class Campfire extends EventEmitter
constructor: (options) ->
@token = options.token
@rooms = options.rooms.split(",")
@account = options.account
@domain = @account + ".campfirenow.com"
@authorization = "Basic " + new Buffer("#{@token}:x").toString("base64")
@jamster
jamster / github_hire_scraper.rb
Created April 1, 2011 18:54
How many fucking people have gitub hired?
require 'rubygems'
require 'activesupport'
require 'bad_ass_extensions'
require 'nokogiri'
require 'open-uri'
class GitHubber
attr_accessor :header, :name, :date, :date_string, :links, :post
def initialize(hash, post)
@dylanegan
dylanegan / Tendercrawl.md
Created June 17, 2011 17:13
Tenderloin bar crawl
@fujin
fujin / gist:1098944
Created July 22, 2011 05:31
tests bombing out, so cool
[pod_services] [Fri, 22 Jul 2011 05:25:55 +0000] INFO: service[pod-services] not queuing delayed action create on ruby_block[pod-services] (delayed), as it's already been queued
: stdout
[pod_services] [Fri, 22 Jul 2011 05:25:55 +0000] INFO: service[pod-services] sending create action to ruby_block[pod-services] (delayed)
: stdout
[pod_services] [Fri, 22 Jul 2011 05:25:55 +0000] INFO: Processing ruby_block[pod-services] action create (pod-services::default line 55)
: stdout
[pod_services] Loaded suite /usr/local/bin/chef-solo
Started: stdout
[pod_services]
[pod_services] #<Class:0x00000001539f98>::ChefMiniTestRunner::DHCPTest#test_request: : stdout
@sealabcore
sealabcore / entrancemusic.js
Created August 19, 2011 18:21
Campfire Propane Entrance and Exit Music With Gifs
/*
Play entrance music
*/
/* defining a new responder is probably the best way to insulate your hacks from Campfire and Propane */
Campfire.EntranceMusician = Class.create({
initialize: function(chat) {
this.chat = chat;
@lusis
lusis / wtf.sh
Created September 12, 2011 19:51
People ask if you know when it's time to move from a shell script to a higher level language? This is it
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
@eric
eric / bundle-outdated-github.rb
Created March 8, 2012 06:11
Annotate your "bundle outdated" with GitHub compare URLs
#!/usr/bin/env ruby
#
# Annotate your "bundle outdated" with GitHub compare URLs
#
require 'open-uri'
require 'json'
def rubygems_gem_info(gem_name)
@mislav
mislav / default.js
Created January 17, 2013 19:42
Un-fucks hijacked Cmd-clicks on links to open pages in a new tab. Put into your ~/.js
;(function($) {
document.addEventListener('click', function(event) {
if (event.metaKey || event.altKey) {
var link = $(event.target).closest('a[href]')
if (link.size()) event.stopPropagation()
}
}, true)
})(jQuery)
@technoweenie
technoweenie / camo.go
Last active December 14, 2015 22:29
incomplete rewrite of camo in go
// outdated
// see https://github.com/technoweenie/camo.go