Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kogakure's full-sized avatar
🏠
Working from home

Stefan Imhoff kogakure

🏠
Working from home
View GitHub Profile
@kogakure
kogakure / gist:70735
Created February 26, 2009 08:19
Bash: Install GetBundles for TextMate
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/
osascript -e 'tell app "TextMate" to reload bundles'
@kogakure
kogakure / vhost.sh
Created March 4, 2009 10:09 — forked from trey/vhost.sh
Bash: Create virtual hosts with `sudo vhost site-name` (Mac OSX Leopard). By Jason Tan.
#!/bin/sh
ME=your-username
DIR=/Users/$ME/Sites/$1
if [ ! -d $DIR ]
then
sudo -u $ME mkdir $DIR
sudo -u $ME touch $DIR/index.php
echo "<h1>$1</h1>" >> $DIR/index.php
fi
@kogakure
kogakure / fabfile.py
Created October 17, 2009 15:15 — forked from jefftriplett/fabfile.py for django
Python: Deployment for Django with Fabric
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
@kogakure
kogakure / webfaction modern python app install notes.rst
Created January 27, 2010 10:26 — forked from bryanveloso/webfaction modern python app install notes.rst
Bash: Install Python 2.6, Virtualenv, Django 1.1 und Postgres auf Webfaction

Python 2.6 + Virtualenv + Django 1.1 + Postgres on WebFaction

  1. mkdir -p ~/bin ~/lib/python2.6/site-packages
  2. Configure the environment by putting something like this in your .bashrc and sourcing it:

    export CFLAGS=-I/usr/local/pgsql/include 
    export LDFLAGS=-L/usr/local/pgsql/lib

Django Enviroment Setup on Mac OSX 10.6.2 (Snow Leopard)

Install Homebrew

sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
brew install git
cd /usr/local
git init
@kogakure
kogakure / fabfile.py
Created April 22, 2010 12:01 — forked from jsmits/fabfile.py
Python: Deployment with Fabric
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'
@kogakure
kogakure / django_2012.md
Created May 5, 2012 09:41 — forked from trey/django_2012.md
Bash: How to start a Django project in 2012

How to start a Django project in 2012

(and deploy to Heroku)

First, warm up your system.

$ easy_install pip
$ pip install virtualenv
$ pip install django
$ gem install heroku
@kogakure
kogakure / gist:2653828
Created May 10, 2012 15:15 — forked from cameronmcefee/gist:2641743
JSON: Font Configuration File
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.
{"mode":"expert","formats":["ttf","woff","eot","svg"],"tt_instructor":"default","options_subset":"advanced","subset_custom":"","subset_custom_range":"f000-f073,f200-f273","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"}
@kogakure
kogakure / admin.html
Created June 24, 2012 12:45 — forked from kmiyashiro/admin.html
JavaScript: Mocha HTML spec
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../libs/mocha.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div id="mocha"></div>
<script src="../libs/mocha.js" type="text/javascript" charset="utf-8"></script>
@kogakure
kogakure / gist:3187467
Created July 27, 2012 11:21 — forked from edennis/gist:3187189
Ruby: Colorized irb prompt for production: ~/.irbrc
# .irbrc
if defined?(Rails) && Rails.production?
conf = IRB.conf[:PROMPT][IRB.conf[:PROMPT_MODE]]
red = "\033[0;31m"
reset = "\033[0m"
[:PROMPT_S, :PROMPT_C].each do |p|
conf[p].gsub!(/^(.*)$/, "#{red}\\1#{reset}")
end
conf[:PROMPT_I] = "#{red}%N(%m):%03n:%i (PRODUCTION) > #{reset}"
end