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
# Automatically add mustaches to any images it can
#
#
module.exports = (robot) ->
robot.hear /^(https?:\/\/[^ #]+\.(?:png|jpg|jpeg))(?:[#]\.png)?$/i, (msg) ->
src = msg.match[1]
unless src.match(/^http:\/\/mustachify.me/)
msg.http("http://stacheable.herokuapp.com")
@atmos
atmos / gist:1311167
Created October 25, 2011 02:48
storage.coffee
# Inspect the data in redis easily
#
# show users - Display all users that hubot knows about
# show storage - Display the contents that are persisted in redis
#
Sys = require "sys"
module.exports = (robot) ->
robot.respond /show storage$/i, (msg) ->
@atmos
atmos / Tendercrawl.md
Created June 29, 2011 23:54 — forked from dylanegan/Tendercrawl.md
Tenderloin bar crawl
@atmos
atmos / meh.js
Created February 15, 2011 07:30
Job.prototype.branches_for = function(branch, callback) {
var self;
self = this;
this.builds(function(err, data) {
var hash, numbers;
numbers = (function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = data.length; _i < _len; _i++) {
hash = data[_i];
@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")
➜ proxymachine git:(master) ✗ rake
env: jruby: No such file or directory
➜ proxymachine git:(master) ✗ which rake
/Users/atmos/Developer/.rvm/gems/ruby-1.8.7-p248/bin/rake
➜ proxymachine git:(master) ✗ alias rake
➜ proxymachine git:(master) ✗
:sunny:
:zap:
:leaves:
:lipstick:
:cop:
:wheelchair:
:fish:
:hammer:
:moneybag:
:calling:
@atmos
atmos / curl
Created December 15, 2010 13:46
➜ curl https://savannah.gnu.org/bugs/index.php\?20421
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
var fs = require('fs')
, path = require('path')
, base64 = require('base64')
var body = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAKIAeYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+kxbCMxpmNRGIwRyf9o5OCxyRtzuBfDE5Jzm/b6dA5JVFVwxJKkgEMzsApAUlgOPmBCgqxG4MSsMiGJRuBOFZjwc5Y5PK
@atmos
atmos / lojack-proxy.god.rb
Created November 13, 2010 03:05
god configs for camo.
God.watch do |w|
w.uid = "git"
w.gid = "git"
w.name = "camo"
w.pid_file = "/data/camo/tmp/camo.pid"
w.interval = 30.seconds
w.env = {
"PORT" => '8080',
"CAMO_KEY" => '0x24FEEDFACEDEADBEEFCAFE'