This file contains hidden or 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
| # install command line tools | |
| # running 'make' will trigger the installation (a confirmation will open) | |
| make | |
| # git should be installed now | |
| git | |
| # setup git | |
| git config --global user.name "John Doe" | |
| git config --global user.email johndoe@example.com |
This file contains hidden or 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
| RD_DIR=~/projects/evme/rd | |
| alias rd='cd $RD_DIR' | |
| alias rdenv='rd && source rd-env/bin/activate' | |
| alias rdshell='rdenv && cd rd/rd_service && ipython -i $RD_DIR/shell.py' | |
| alias rdpostgres='postgres -D /usr/local/var/postgres' | |
| alias rdworker='rdenv && cd rd/rd_service && python cli.py worker' | |
| alias rdclearjobs='redis-cli del jobs' | |
| alias rdweb='cd $RD_DIR/rd && honcho start -f Procfile.dev' |
This file contains hidden or 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
| # download imagesnap [http://iharder.sourceforge.net/current/macosx/imagesnap/] | |
| # identify your video recording device | |
| ./imagesnap -l | |
| # repeatedly take a snapshot | |
| while :; do ./imagesnap -d "HD Pro Webcam C920" ~/Pictures/snapshots/`date +%H-%M-%S`.jpeg; sleep 58; done | |
| # optional: resize | |
| # WARNING - will overrite your files |
This file contains hidden or 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
| # source | |
| https://www.facebook.com/notes/%D7%93%D7%96%D7%90%D6%B7%D7%A0%D7%90%D6%B7%D7%98%D7%94%D7%A2%D7%9F-%D7%9E%D7%99%D7%99/aachen-style-local-history-or-never-forget-what-you-did-ever-again/10152290882464430 | |
| This comes from Carmen Heger and Sasa Hasan, by way of Aachen, where Arne Mauser was the apparent originator. Please feel free to share this but cite them (not me, unless you want to cite this specific note). If you want to skip to the instructions they're at the bottom. | |
| The idea is a .history file is created in every directory you work in with the list of all the commands you typed (except for a few that match a list of boring stuff like ls). | |
| This is if you want to save yourself the trouble of cut-and-pasting into a README in each directory. I still do that, actually, but this functions as a readme of last resort. It's also great for seeing what steps others have done if you're trying to debug their inability to reproduce your results. | |
| example: |
This file contains hidden or 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
| brew install qpdf | |
| # first decrypt | |
| find . -name '*.pdf' | xargs basename | xargs -L1 -I {} qpdf --decrypt --password=PASSWORD {} dec{} | |
| # then merge | |
| qpdf --empty --pages dec*.pdf -- all.pdf |
This file contains hidden or 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
| from marionette import Marionette | |
| m = Marionette() | |
| m.start_session() | |
| from gaiatest.apps.homescreen.app import Homescreen | |
| hs = Homescreen(m) | |
| from gaiatest import GaiaDevice | |
| gd = GaiaDevice(m) | |
| gd.unlock() | |
| hs.launch() | |
| hs.open_context_menu() |
This file contains hidden or 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 documents the process I used to migrate the project from | |
| # mercurial (bitbucket) to git (github) | |
| # | |
| # we are going to need | |
| # - fast export: https://github.com/frej/fast-export | |
| # - bfg: http://rtyley.github.io/bfg-repo-cleaner/ | |
| alias bfg="java -jar bfg.jar" | |
| # clone single revision of the hg repo to eliminate unwanted heads |
This file contains hidden or 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
| for next in `cat $1` | |
| do | |
| say "$next" | |
| read | |
| done | |
| exit 0 |
This file contains hidden or 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
| cd my-repo | |
| git fetch upstream | |
| git checkout --detach upstream/master | |
| git pull --no-commit upstream refs/pull/<pr-id>/head | |
| # local repo now has (uncommited) changes from pull request |