Skip to content

Instantly share code, notes, and snippets.

View buritica's full-sized avatar
💭
💀

Juan Pablo Buriticá buritica

💭
💀
View GitHub Profile
@sergiolopes
sergiolopes / ios5webdebug.sh
Created March 2, 2012 21:47
Runs iOS 5 simulator with MobileSafari remote debug
#!/bin/bash
# Open iPhone Simulator on default location for XCode 4.3
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
# Open mobile safari
echo Open mobile safari on emulator and press return
read
# Plug debug to MobileSafari.app
@gf3
gf3 / ago.js
Created June 2, 2011 18:43
Super small relative dates
module.exports = (function(){
const MS =
{ seconds: 1000
, minutes: 60 * 1000
, hours: 60 * 60 * 1000
, days: 24 * 60 * 60 * 1000
, weeks: 7 * 24 * 60 * 60 * 1000
, months: 30 * 7 * 24 * 60 * 60 * 1000
, years: 365 * 24 * 60 * 60 * 1000 }
@cowboy
cowboy / clone_fast.rb
Created April 12, 2011 21:19
Ruby: Clone Yer GitHub Repos, Fast!
# /usr/bin/env ruby
puts <<-EOF
Clone Yer GitHub Repos, Fast! - v0.2.1 - 4/13/2011
http://benalman.com/
For when you're on a new computer and need all your stuff, fast!
EOF
copyright = <<-EOF
@dhrrgn
dhrrgn / init.rb
Created April 1, 2011 00:19
A simple initialization script to create vhosts.
#!/usr/bin/env ruby
# USAGE: sudo ./init.rb project_name path/to/web/root
# NOTE: This file must be run with root privileges (sudo).
# You must also give it exec permissions: chmod +x init.rb
# This should include the trailing slash
DEFAULT_ROOT = '/Users/dan/Sites/'
VHOST_FOLDER = '/etc/apache2/sites/'