Skip to content

Instantly share code, notes, and snippets.

<!--
StickyTheme for Tumblr
http://stickytheme.tumblr.com/
http://gist.github.com/86432
By http://htxt.org/
Based on http://stickyscreen.org/
@meleyal
meleyal / MySQL recipes
Created March 30, 2009 14:44
MySQL recipes
#login
mysql -u <user> -p
# list all databases
show databases;
# 'open' a database
use <database_name>;
# list all tables
@meleyal
meleyal / gist:88360
Created March 31, 2009 19:28
Bash recipes
# Clear the screen
ctl + l
# Command history
up key to cycle through last commands
# Auto complete
Start typing a path/filename + tab to complete
Tab twice to see all options
@meleyal
meleyal / Paswordless SSH logins
Created April 17, 2009 10:19
SSH passwordless logins
# Create the .ssh directory if it's not already under ~/
ssh user@server
mkdir .ssh
chmod 700 .ssh
exit
# Create a private/public key pair if you didn't already
ssh-keygen
# Copy your public key to the remote server
@meleyal
meleyal / homebrew + mysql + mysql gem
Created June 9, 2010 15:43
homebrew + mysql + mysql gem
sudo gem install mysql -v 2.7 -- --with-mysql-dir=/usr/local/lib/mysql --with-mysql-config=/usr/local/bin/mysql_config
@meleyal
meleyal / textmate-folder-pattern
Created June 17, 2010 12:50
Folder Pattern for Textmate to ignore log/doc/tmp
# Exclude log/doc/tmp
!.*/(\.[^/]*|log|doc|tmp|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
# Original
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
@meleyal
meleyal / regex: remove link search + replace
Created June 17, 2010 15:09
regex: remove link search + replace
@meleyal
meleyal / console.log
Created August 3, 2010 15:44
console.log textmate snippet
// Activation: Tab Trigger > log
console.log($1);
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Clouds</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@meleyal
meleyal / hello-world-route.js
Created August 3, 2010 10:55
Hello world with route.js
route('#/hello').bind(myFunction);
function myFunction(){
alert('Hello world');
}
// route('#/hello').run();
var App={};
App._hashchange_last = '';