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 / myip
Created June 3, 2013 10:36 — forked from warthurton/myip
#!/bin/bash
active_interface=`netstat -rn | grep 'default' | awk '{print $6}'`
ifconfig | grep -A 1 $active_interface | grep 'inet ' | awk '{printf $2}'
[alias]
ready = init
some = clone
down = pull
up = push
lost = stash
found = stash pop
overit = stash clear
in = add
out = rm
@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
@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: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 / 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 / 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'

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 / 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
@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