Skip to content

Instantly share code, notes, and snippets.

View jbueza's full-sized avatar

Jaime Bueza jbueza

View GitHub Profile
@netzpirat
netzpirat / 0_README.md
Created November 12, 2010 10:42
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@brianleroux
brianleroux / makefile
Created February 25, 2011 20:46
launch emulators
emulate:
emulator -cpu-delay 0 -no-boot-anim -cache ./cache -avd default > /dev/null 2>&1 & # put the avd's chatty ass in the background
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
palm-emulator --start "SDK 1.4.5.465 (320x480)"
@tj
tj / in.luna
Created July 9, 2011 05:10
luna -> js, just for fun since it's trivial to output js
express = require('express')
app = express createServer()
app get('/'): req res next
return res send('<p>Hello</p>') if req accepts('html')
return res send('Hello') if req accepts('text')
next()
app listen(3000)
console log('Express app started on port 3000')
@ded
ded / virtual-hosts-connect.js
Created July 13, 2011 01:08
run multiple hosts (domains) on a single node process
var connect = require('connect')
, app = require('./app')
, app2 = require('./app2')
connect(
connect.vhost('dustindiaz.com', app)
, connect.vhost('foobar.dustindiaz.com', app2)
).listen(3000)
@ded
ded / parallel.js
Created July 21, 2011 01:10
call multiple async methods in parallel and receive the result in a callback
function parallel() {
var args = Array.apply(null, arguments)
, callback = args.pop()
, returns = []
, len = 0
args.forEach(function (el, i) {
el(function () {
var a = Array.apply(null, arguments)
, e = a.shift()
if (e) return callback(e)
@steveluscher
steveluscher / mojo_dojo_connector.js
Created August 11, 2011 16:56
A Mojo->Dojo connector; re-implement these methods in another library, and you can use Mojo 2.0 without Dojo.
/* Mojo-Dojo connector */
(function() {
if(typeof mojo == 'undefined') mojo = {};
mojo.addOnUnload = dojo.addOnUnload;
mojo.clone = dojo.clone;
mojo.config = dojo.config;
mojo.connect = dojo.connect;
mojo.declare = dojo.declare;
mojo.destroyElement = dojo._destroyElement;
@tanepiper
tanepiper / gist:1884587
Created February 22, 2012 12:18
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+X delete line
Ctrl+↩ insert line after
Ctrl+⇧+↩ insert line before
Ctrl+⇧+↑ move line (or selection) up
@tanepiper
tanepiper / gist:1887182
Created February 22, 2012 20:54 — forked from axelav/gist:1839777
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@SyntaxC4
SyntaxC4 / .user.ini
Last active October 12, 2020 14:52
Web.config Starter for PHP on Windows Azure Web Sites
upload_max_filesize = 12M
log_errors=1
@RobSpectre
RobSpectre / messages.py
Created September 27, 2012 19:09
Get the last n number of Sms Messages
from twilio.rest import TwilioRestClient
ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxx'
AUTH_TOKEN = 'yyyyyyyyyyyyyyyyyyyy'
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
messages = client.sms.messages.list()
for msg in messages: