git pretty log

September 20, 2009 varnit Leave a comment

git config –global alias.lol “log –pretty=oneline –abbrev-commit –graph –decorate”

or

git config –global alias.lg “log –graph –pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset’ –abbrev-commit –date=relative”

Categories: git Tags:

git color

September 13, 2009 varnit Leave a comment

git config –global color.ui true

Categories: git Tags:

mac os x terminal pipe to clipboard

September 6, 2009 varnit Leave a comment

cat file.txt | pbcopy

Categories: mac Tags:

sqlite query index

August 29, 2009 varnit Leave a comment

Coming from mysql background I found few odd things with sqlite, here is a basic intro to sqlite indexes.

sqlite> CREATE TABLE dogs (dog_id INTEGER PRIMARY KEY AUTOINCREMENT, dog_name VARCHAR(100), state CHAR(2));

sqlite> CREATE INDEX dog on dogs(state);

sqlite> .indices dogs
dog

sqlite> EXPLAIN QUERY PLAN SELECT dog_name FROM dogs WHERE state=’FL’;
0|0|TABLE leagues WITH INDEX league

Categories: sqlite Tags:

push changes to origin git server

June 16, 2009 varnit Leave a comment

git push origin master

Categories: git Tags: