This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir heroku-django | |
cd heroku-django | |
virtualenv --no-site-packages . | |
source bin/activate | |
bin/pip install django |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -R.jpg,.jpeg,.gif,.png,.css,.js -c -r http://www.example.com/ -o urllog.txt | |
grep ' http' urllog.txt | awk '{print $3}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((http://)?|https://|ftp://|rtsp://|mms://|shttp://|tv://)([-\w\.]+)+(:\d+)?(/[^\s]+)? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author: Abhinay Omkar | |
// Input: "red=123&green=456&blue=789" | |
// Output: [{key: 'red', value: 123}, {key: 'green', value: 456}, ... | |
var dict = [], i = 0; qparams.split('&').map(function(s) { dict[i] = {}; kv = s.split('='); dict[i].key = kv[0]; dict[i].value = kv[1]; i = i + 1; }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## GIT Colors ON | |
git config color.branch auto | |
git config color.diff auto | |
git config color.interactive auto | |
git config color.status auto | |
## GIT Default Editor | |
git config --global core.editor vim | |
## Undo the Push (Revert the changes on Remote) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync --partial --progress --rsh=ssh user@hostname:/path/to/file /local/destination/path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show tables | |
\dt | |
-- create a new database | |
# CREATE DATABASE mydb; | |
-- create user | |
# CREATE USER abhinay with password 'secret'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." --Martin Golding | |
"Programming is like sex: one mistake and you’re providing support for a lifetime." --Michael Sinz | |
"The trouble with programmers is that you can never tell what a programmer is doing until it’s too late." --Seymour Cray | |
"Good code is its own best documentation." --Steve McConnell | |
"Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves." --Alan Kay |