git remote -v
git remote remove origin
git remote add upstream <ORIGINAL>
git fetch upstream
git checkout master
git merge upstream/master
Build Dockerfiles:
docker build -t crisp/nginx /path/to/Dockerfile
Run in daemon mode:
docker run --name nginx -d -p PORT1:PORT1 -p PORTn:PORTn -v VOL1:VOL1 -v VOLn:VOLn crisp/nginx
git checkout master
git reset --hard upstream/master
git push --force
int
foo(bar)
int bar
{
...
}
module DateAndTime | |
module Calculations | |
def this_year? | |
year == ::Date.current.year | |
end | |
end | |
end |
# roll back commit | |
git reset --soft HEAD^ | |
# remove file from index | |
git reset HEAD path/to/unwanted_file | |
# commit again without unwanted files | |
git commit -m "My commit message" | |
# Source: http://stackoverflow.com/questions/12481639/remove-files-from-git-commit |
awk 'BEGIN {srand()} !/^$/ { if (rand() <= .01) print $0}' |
grep CRON /var/log/syslog |