This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>author</key> | |
<string>Trey Piepmeier</string> | |
<key>comment</key> | |
<string>By Trey Piepmeier (original SpaceCadet by Alex Ross)</string> | |
<key>name</key> | |
<string>SpaceCadet Pro</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can avoid this shuffle if you do something like this: | |
# | |
# You should only use this technique with private projects, | |
# since your passwords will be in source control for everyone to see. | |
hostname = os.uname()[1].lower() | |
if hostname in ['something.dev']: | |
# Development settings | |
elif hostname in ['something_else.com', 'and_another.com']: | |
# Staging settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /var/git | |
mkdir $1.git | |
cd $1.git | |
git --bare init | |
sudo chown -R git . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
set( | |
fab_hosts = ['host.com'], | |
fab_user = 'user', | |
server_path = '/home/user/django/apache2/bin', | |
project_path = '/home/user/django/project', | |
memcached_ip = 'IP', | |
memcached_port = 'PORT', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BACKUP_DIR="/Users/`whoami`/Desktop/db-backups/" | |
MYSQL_HOST="localhost" | |
MYSQL_USER="root" | |
MYSQL_PASS="" | |
MYSQL_BACKUP_DIR="$BACKUP_DIR" | |
MYSQL_PATH="$(which mysql)" | |
MYSQLDUMP_PATH="$(which mysqldump)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR=/Users/$SUDO_USER/Sites/$1 | |
if [[ ! -d $DIR && `id -u` -eq 0 ]]; then | |
sudo -u $SUDO_USER mkdir $DIR | |
sudo -u $SUDO_USER cp ~/Webs/site-template/html5.html $DIR/index.html | |
echo "" | |
echo "copied $1/index.html ..." | |
sudo -u $SUDO_USER cp ~/Webs/site-template/.htaccess $DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias tmbundles='cd ~/"Library/Application Support/TextMate/Bundles/";clear;pwd' | |
alias tmreload="osascript -e 'tell app \"TextMate\" to reload bundles'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\WINDOWS\system32\drivers\etc\hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils.safestring import mark_safe | |
from django.forms.widgets import FileInput | |
from django.utils.translation import ugettext as _ | |
# How to display image from ImageField in ModelAdmin: | |
# http://groups.google.com/group/django-users/browse_thread/thread/7cfbcc67f3af02b8/0fa00367ff96f8c8 | |
class AdminImageFieldWithThumbWidget(FileInput): | |
""" | |
For use with sorl-thumbnail (sorl-thumbnail.googlecode.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch(id){ | |
case "previous": | |
// something | |
break; | |
case "next": | |
// something | |
break; | |
default: | |
// something | |
} |