This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'cgi' | |
lint = `/usr/local/bin/jslint4java #{ENV['TM_FILEPATH']}` | |
lrxp = Regexp.new(/jslint:.+.js:(\d+):(\d+):(.+)/i) | |
output = String.new | |
lint.split("\n").each do |error| | |
match = lrxp.match(error) | |
line = `cat #{ENV['TM_FILEPATH']} | head -#{match[1]} | tail -1` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------- | |
# Create SoundCloud-style waveforms from mp3 files | |
# Author: David Cornu | |
# Credit for the idea goes to http://cl.ly/292t2B09022I3S3X3N2O | |
# | |
# Requirements: | |
# mpg123 - [ % brew install mpg123 ] | |
# imagemagick - [ % brew install imagemagick ] | |
# rmagick - [ % brew install rmagick ] | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Usage: wget https://raw.github.com/artfox/ArtfoxMedia/master/install/install.sh -O - | sh | |
set -e; | |
echo ' | |
_______ _______ ______ _____ _______ | |
| | | |______ | \ | |_____| | |
| | | |______ |_____/ __|__ | | | |
_______ _______ ______ _ _ _______ ______ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show SQL queries in rails console | |
ActiveRecord::Base.logger = Logger.new(STDOUT) if "irb" == $0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.write('<!DOCTYPE html><html><head><script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"><\/script></head><body>Loading...</body></html>'); | |
setInterval(function(){ | |
jQuery('body').load(window.location.href); | |
}, 5000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EventedClass | |
bind: (event, callback) -> | |
@eventHandlers ||= {} | |
@eventHandlers[event] = [] unless @eventHandlers[event]? | |
@eventHandlers[event].push(callback) | |
return true | |
unbind: (event, callback) -> | |
@eventHandlers ||= {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/ruby /Users/davidcornu/manager.rb $1 $2 $3 $4 $5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding : utf-8 -*- | |
class StaticController < ApplicationController | |
before_filter :admin_authentication, :only => :api_test | |
def index | |
end | |
def getting_started |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bassline = Thread.new do | |
`yes "wub" | xargs say` | |
end | |
lead = Thread.new do | |
`say -v cellos Doo da doo da dum dee dee doodly doo dum dum dum doo da doo da doo da doo da doo da doo da doo` | |
end | |
bassline.join | |
lead.join |
OlderNewer