Skip to content

Instantly share code, notes, and snippets.

View gduverger's full-sized avatar

Georges Duverger gduverger

View GitHub Profile
;( function( $, window, undefined ) {
var $body;
$( function() {
$body = $( "body" );
}
})( jQuery, window );
git submodule add [repo.git] [repo]
(git submodule init)
git submodule update
cat .gitmodules
// http://git-scm.com/book/en/Git-Tools-Submodules
@gduverger
gduverger / gist:4cecbfad3de227626678
Last active August 29, 2015 14:06
Git stashing
git stash
git stash list
git stash apply
git stash apply stash@{2}
git stash clear
// http://git-scm.com/book/en/Git-Tools-Stashing
@gduverger
gduverger / gist:c2045eca44d2fc4ec044
Last active August 29, 2015 14:06
Find and kill a process
ps aux | grep gunicorn
kill -9 PID
@gduverger
gduverger / gist:8b5bc3962a65eec48d61
Created August 11, 2014 00:37
Empty file from command line
cat /dev/null > file.txt
pythonX.X manage.py dumpdata -e contenttypes > app/dumps/…
@gduverger
gduverger / gist:8760532
Last active August 29, 2015 13:55
Font sizes
/* 6 (0.375), 7 (0.4375), 8 (0.5), 9 (0.5625), 10 (0.625), 11 (0.6875), 12 (0.75), 14 (0.875),
16 (1), 18 (1.125), 21 (1.3125), 24 (1.5), 36 (2.25), 48 (3), 60 (3.75), 72 (4.5) px (em) */
// http://markboulton.co.uk/journal/five-simple-steps-to-better-typography-part-4
@gduverger
gduverger / gist:8726448
Last active March 29, 2020 15:09
Set up virtual environment
cd …
pipenv install requests
# sudo easy_install virtualenv
# mkdir <venv>
virtualenv venv --python=python3.6 --no-site-packages --verbose
source venv/bin/activate
deactivate
# http://simononsoftware.com/virtualenv-tutorial/
@gduverger
gduverger / gist:6379920
Created August 29, 2013 15:53
Deleting remote and local branch
git push origin :branch_name
git branch -d branch_name
@gduverger
gduverger / gist:5922291
Created July 3, 2013 20:04
Create remote branch
git checkout -b branch_name
git push origin branch_name
// http://stackoverflow.com/questions/1519006/git-how-to-create-remote-branch