-
Simplest intro to git by github and codeschool - Try Git
-
[Intro to github]
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
| backspace 8 | |
| tab 9 | |
| enter 13 | |
| shift 16 | |
| ctrl 17 | |
| alt 18 | |
| pause/break 19 | |
| caps lock 20 | |
| escape 27 | |
| page up 33 |
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
| protractor.wrapDriver | |
| protractor.setInstance | |
| protractor.getInstance | |
| protractor.By | |
| protractor.By.binding | |
| protractor.By.select | |
| protractor.By.selectedOption | |
| protractor.By.input | |
| protractor.By.repeater |
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
| #!/bin/bash | |
| # remove exited containers: | |
| docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
| # remove unused images: | |
| docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
| # remove unused volumes: | |
| find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <( |
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
| # Recursively find and replace in files | |
| find . -name "*.txt" -print0 | xargs -0 sed -i '' -e 's/foo/bar/g' | |
| Here's how it works: | |
| find . -name '*.txt' finds, in the current directory (.) and below, all files whose names end in .txt | |
| | passes the output of that command (a list of filenames) to the next command | |
| xargs gathers up those filenames and hands them one by one to sed | |
| sed -i '' -e 's/foo/bar/g' means "edit the file in place, without a backup, and make the following substitution (s/foo/bar) multiple times per line (/g)" (see man sed) | |
| Note that the 'without a backup' part in line 4 is OK for me, because the files I'm changing are under version control anyway, so I can easily undo if there was a mistake. |
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
| echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf | |
| echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf | |
| sudo sysctl -w kern.maxfiles=65536 | |
| sudo sysctl -w kern.maxfilesperproc=65536 | |
| ulimit -n 65536 65536 |
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
| sudo chown `whoami` /data/db |