Skip to content

Instantly share code, notes, and snippets.

View kyleknighted's full-sized avatar

Kyle Knight kyleknighted

View GitHub Profile
for(var person in myChair){
alert('GET OUT OF MY CHAIR!!!');
// http://www.hark.com/clips/spytzjhbxv-outta-my-chair
}
@kyleknighted
kyleknighted / bouncebreak.coffee
Created May 18, 2012 19:25
Hubot Random Bouncebreak.com Image
# Bounce Break script
#
# bounce me - Send a random bouncebreak.com image
htmlparser = require "htmlparser"
module.exports = (robot) ->
robot.respond /(bounce|bouncebreak)( me)?/i, (msg) ->
bounceBreakCall msg, (image_url) ->
msg.send image_url
class Mapping < ActiveRecord::Base
belongs_to :user
require "CSV"
has_attached_file :csv_file,
:path => ":rails_root/public/system/mapping/:id/:filename",
:url => "/system/mapping/:id/:filename"
# after_create :create_csv
def get_csv_headers
class CsvFile < ActiveRecord::Base
belongs_to :user
require "CSV"
has_attached_file :csv_file,
:path => ":rails_root/public/system/csvfile/:id/:filename",
:url => "/system/csvfile/:id/:filename"
after_create :parse_csv
def parse_csv