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
@atmos
atmos / .vimrc
Created November 17, 2012 06:25
my .vimrc file from 2006
" lots stolen from Tom Gilbert and Gnea's vimrc
filetype on
syntax on
set expandtab
set autoindent
set autowrite
set backspace=2
set background=dark
set fileformat=unix
@atmos
atmos / ps3-buttons.txt
Created October 9, 2012 11:39
So I don't forget these later.
#1 = SELECT
#2 = L3
#3 = R3
#4 = START
#5 = DPAD UP
#6 = DPAD RIGHT
#7 = DPAD DOWN
#8 = DPAD LEFT
#9 = L2
#10 = R2
# Utility commands surrounding Hubot uptime.
spawn = require('child_process').spawn
module.exports = (robot) ->
robot.hear /hubot (who|where) are you\??/i, (msg) ->
msg.finish()
child = spawn('/bin/sh', ['-c', "echo I\\'m $LOGNAME@$(hostname):$(pwd) \\($(git rev-parse HEAD)\\)"])
child.stdout.on 'data', (data) ->
msg.send "#{data.toString().trim()} running node #{process.version} [version: #{robot.version}, pid: #{process.pid}, name: #{robot.name} ]"
@atmos
atmos / rohan-me.rb
Created August 9, 2012 22:21
rohan me with macruby
framework 'Cocoa'
framework 'CoreGraphics'
class NSColor
def toCGColor
color_RGB = colorUsingColorSpaceName(NSCalibratedRGBColorSpace)
## approach #1
# components = Array.new(4){Pointer.new(:double)}
# color_RGB.getRed(components[0],
# green: components[1],
@atmos
atmos / bookmarklet.js
Created April 27, 2012 11:24
easily get an embeddable gif from gifsoup.com, make this the content of your bookmark
javascript:alert($(".gif").attr("src"))
@atmos
atmos / ember-0.9.5.min.js
Created March 31, 2012 17:49 — forked from briandoll/loud.on.twitter.html
Find the loudest mentions of @github on twitter
// ==========================================================================
// Project: Ember - JavaScript Application Framework
// Copyright: ©2011-2012 Tilde Inc. and contributors
// Portions ©2006-2011 Strobe Inc.
// Portions ©2008-2011 Apple Inc. All rights reserved.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
(function(a){var b={};window.Handlebars=b,b.VERSION="1.0.beta.2",b.helpers={},b.partials={},b.registerHelper=function(a,b,c){c&&(b.not=c),this.helpers[a]=b},b.registerPartial=function(a,b){this.partials[a]=b},b.registerHelper("helperMissing",function(a){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+a+"'")}),b.registerHelper("blockHelperMissing",function(a,b){var c=b.inverse||function(){},d=b.fn,e="",f=Object.prototype.toString.call(a);f==="[object Function]"&&(a=a());if(a===!0)return d(this);if(a===!1||a==null)return c(this);if(f==="[object Arr
.__ ___. .__ __ .__ .___
| |__ _____ ______ ______ ___.__. \_ |__ |__|_______ _/ |_ | |__ __| _/_____ ___.__.
| | \ \__ \ \____ \ \____ \< | | | __ \ | |\_ __ \\ __\| | \ / __ | \__ \ < | |
| Y \ / __ \_| |_> >| |_> >\___ | | \_\ \| | | | \/ | | | Y \/ /_/ | / __ \_\___ |
|___| /(____ /| __/ | __/ / ____| |___ /|__| |__| |__| |___| /\____ | (____ // ____|
\/ \/ |__| |__| \/ \/ \/ \/ \/ \/
_____ ___ ___ ___ ___ ___
/ /::\ / /\ / /\ /__/\ /__/\ /__/| ___
/ /:/\:\ / /:/_ / /:/_ \ \:\ \ \:\ | |:| / /\
/ /:/ \:\ / /:/ /\ / /:/ /\ \ \:\ \ \:\ | |:| / /:/
@atmos
atmos / gist:1823612
Created February 14, 2012 04:45
yo lemme see what version of the heroku gem i have installed.
$ heroku --version
! `--version` is not a heroku command.
! Perhaps you meant `version`.
! See `heroku help` for additional details.
~$ heroku -V
! `-V` is not a heroku command.
! Perhaps you meant `-h`.
! See `heroku help` for additional details.
~$ heroku -version
! `-version` is not a heroku command.
@atmos
atmos / clean-merged-branches
Created January 5, 2012 08:28
clean-merged-branches
#!/bin/sh
#/ Usage: clean-merged-branches [-f]
#/ Delete merged branches from the origin remote.
#/
#/ Options:
#/ -f Really delete the branches. Without this branches are shown
#/ but nothing is deleted.
set -e
# show usage maybe
@atmos
atmos / lolz.coffee
Created October 26, 2011 23:56 — forked from dstrelau/lolz.coffee
hubot script to insert images from bukk.it
# lulz - BRING THE LOLZ from bukk.it
Select = require("soupselect").select
HtmlParser = require "htmlparser"
util = require 'util'
module.exports = (robot) ->
robot.respond /l[ou]lz/i, (msg) ->
msg.http("http://bukk.it")
.get() (err, res, body) ->