brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
#!/usr/bin/env python | |
""" | |
urlnorm.py - URL normalisation routines | |
urlnorm normalises a URL by; | |
* lowercasing the scheme and hostname | |
* taking out default port if present (e.g., http://www.foo.com:80/) | |
* collapsing the path (./, ../, etc) | |
* removing the last character in the hostname if it is '.' |
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS | |
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing). | |
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here: | |
* Heroku Hostname SSL | |
* GoDaddy Standard SSL Certificate | |
* Zerigo DNS |
UPDATE pg_database SET datistemplate=FALSE WHERE datname='template1'; | |
DROP DATABASE template1; | |
CREATE DATABASE template1 WITH owner=postgres template=template0 encoding='UTF8'; | |
UPDATE pg_database SET datistemplate=TRUE WHERE datname='template1'; |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { | |
'verbose': { | |
'format': '%(asctime)s - %(name)s - %(levelname)s: %(message)s', | |
}, | |
'simple': { | |
'format': '%(levelname)s: %(message)s', | |
} |
# Log switchboard stuff to logfile | |
LOGGING['loggers']['switchboard']['handlers'] = ['logfile'] | |
LOGGING['loggers']['switchboard']['level'] = 'WARNING' | |
LOGGING['handlers']['logfile']['filename'] = '/var/log/apache2/capstone.savidworks.com/switchboard.log' |
from __future__ import division | |
import os | |
import subprocess | |
try: | |
from cStringIO import StringIO | |
except ImportError: | |
from StringIO import StringIO |
/* Instantiate the global sp object; include models & views */ | |
var sp = getSpotifyApi(1); | |
var models = sp.require("sp://import/scripts/api/models"); | |
// Get the track that is currently playing | |
var currentTrack = models.player.track; | |
// If nothing currently playing | |
if (currentTrack == null) { | |
$('#now-playing').append('No track currently playing'); |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
github recently switched to an https scheme as the default for cloning repos. as a side effect you may suddenly be prompted for a 'Username' and 'Password' when you push where, previously, you were able to do so without typing in credentials. the solution is to cause git to cache https credentials which is easy, since git uses curl under the covers
in your home directory create a file called '.netrc', for example
/Users/ahoward/.netrc
in it put these contents