Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
// ---------------------------------------------------------------------------- | |
// markItUp! | |
// ---------------------------------------------------------------------------- | |
// Copyright (C) 2008 Jay Salvat | |
// http://markitup.jaysalvat.com/ | |
// ---------------------------------------------------------------------------- | |
// Html tags | |
// http://en.wikipedia.org/wiki/html | |
// ---------------------------------------------------------------------------- | |
// Basic set. Feel free to add more tags |
/* | |
* timeago: a jQuery plugin ported to Zepto, version: 0.9.3 (2011-01-21) | |
* @requires Zepto.js 0.4 | |
* | |
* Timeago is a jQuery plugin that makes it easy to support automatically | |
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago"). | |
* | |
* For usage and examples, visit: | |
* http://timeago.yarp.com/ | |
* |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
worker: QUEUE=* bundle exec rake environment resque:work | |
scheduler: bundle exec rake environment resque:scheduler |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
/* | |
* Javascript time conversion script | |
* version 1.0 | |
* @requires jQuery | |
* @author Modern Tribe, Inc. (Peter Chester) | |
* | |
* Converts several formats to a 2 point float. Accepted formats include: | |
* 1.3333333333 | |
* 1h 10m | |
* 1:10 |
#!/usr/bin/sh | |
rm -rf "$HOME/Library/Preferences/WebIde40" | |
rm -rf "$HOME/Library/Caches/WebIde40" | |
rm -rf "$HOME/Library/Application Support/WebIde40" | |
rm -rf "$HOME/Library/Logs/WebIde40" |
# I'm no benchmark guru. Just did a bunch of: | |
$ time ruby <filename> | |
# Note: This is just an 80mb XML file with 38,000 nodes. | |
ox_dom.rb 4.56s user 0.78s system 93% cpu 5.714 total (550mb) | |
ox_dom.rb 4.58s user 0.79s system 87% cpu 6.126 total (550mb) | |
ox_dom.rb 4.60s user 0.80s system 87% cpu 6.140 total (550mb) | |
nokigiri_dom.rb 11.75s user 1.02s system 94% cpu 13.518 total (895mb) | |
nokigiri_dom.rb 11.36s user 1.02s system 93% cpu 13.211 total (895mb) |