Skip to content

Instantly share code, notes, and snippets.

@meleyal
meleyal / svn-recipes.sh
Created March 2, 2009 18:14
SVN recipes
# limit the log to the last 4 commits
svn log --limit 4
# show the log for a particular file
svn log foo.js
# create a new repo
svn import http://repo/path/<new-repo> -m "Initial import"
# create a new branch
<!--
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 / theme.jstn.cc
Created February 10, 2010 11:31
theme.jstn.cc
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>{Title}{block:PostTitle} - {PostTitle}{/block:PostTitle}</title>
{block:Description}
<meta name="description" content="{MetaDescription}">
{/block:Description}
@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
<?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>