December 9th, 2008 at 10:44 pm (Programming, Ramblings)
Browsing for something on the google earlier today, I ran across a way to set up a git branch aware bash prompt. It’s pretty slick if you are always in and out of git branches (if you’re not you should be)
First download git-completion.bash
http://repo.or.cz/w/git.git?a=blob_plain;f=contrib/completion/git-completion.bash;hb=HEAD
I saved it as ~/.git-completion.bash.
Next edit your ~/.bash_profile
Add
source ~/.git-completion.bash
PS1='\h:\W$(__git_ps1 "(%s)") \u\$ '
Finally source ~/.bash_profile to make zee changes active.
What results is this when you are in a git repository:
bigtex:jason(jquery_localize) jason$ git checkout master
Switched to branch "master"
bigtex:jason(master) jason$ git checkout jquery_localize
Switched to branch "jquery_localize"
bigtex:jason(jquery_localize) jason$
Comments
April 21st, 2008 at 10:53 pm (Programming)
There have been a few git updates since I last made a package. Here’s the latest 1 day after it’s release. Note: It will clean up the previous install for you.
Remeber to add this line to ~/.bash_profile if you haven’t already:
export PERL5LIB=/usr/local/lib/perl5/site_perl/
You can download git 1.5.5.1 here: http://code.twi.gs/git-1.5.5.1.pkg
Comments
March 31st, 2008 at 4:51 pm (Programming)
What a headache. After a couple of hours of googleing, it looks like this is the way you should install PIL on OS X:
Download libjpeg: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
At the time of this writing the libjpeg homepage is down.
Next compile it:
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
./configure --enable-shared --enable-static
make
sudo make install
sudo ranlib /usr/local/lib/libjpeg.a
Edit: If sudo make install fails, mkdir the directories that make is trying to install the files into. There are a couple of man directories and a bin directory.
Now download PIL: http://effbot.org/downloads/Imaging-1.1.6.tar.gz
and compile it
tar xvzf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
sudo python setup.py install
Whew… what a mess.
5 Comments
February 15th, 2008 at 6:10 pm (Programming)
I didn’t really want to compile git on the Air so I used the MBP to create a package for it. This will install git in /usr/local (so it’s relatively easy to uninstall manually… sudo rm /usr/local/bin/git* … etc). This package is for Leopard. I don’t know if (and doubt) it’ll work on anything else.
The only drawback to me making this package is you need to edit (or create) ~/.bash_profile and add this line:
export PERL5LIB=/usr/local/lib/perl5/site_perl/
You can download git 1.5.4.1 here: http://code.twi.gs/git-1.5.4.1.pkg
1 Comments
April 14th, 2007 at 6:53 pm (Programming)
MySQL Postgres Description
show databases; \l Lists all databases
show tables; \d Lists tables of a database
use db; \c db Connects to a database for use
desc table; \d table Displays table definition
n/a \z object View user/host/db permissions
1 Comments