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
| --- | |
| - name: 'Configure WIFI' | |
| copy: src=./wpa_supplicant.conf dest=/etc/wpa_supplicant/wpa_supplicant.conf mode=0600 | |
| # https://github.com/motdotla/ansible-pi/blob/master/roles/pi/tasks/main.yml |
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
| Example: want to remove all things with ubuntu 14.04.. | |
| remove docker contrainers with grep: | |
| ```~/dev/practice/docker | |
| $ docker ps -a |grep 14.04|cut -d" " -f 1|xargs -n 3 docker rm | |
| ffefde7fe6ac | |
| 74f390d831e4 | |
| 3c9750561f25 | |
| e34ab210baff | |
| 114af06a2e33 |
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
| # run these to clear up virtualbox space | |
| $ docker rm -f $(docker ps -a -q) | |
| $ docker rmi -f $(docker images -af "dangling=true" -q) | |
| # export a docker machine ip | |
| ```bash | |
| export DOCKER_MACHINE_IP=$(docker-machine ip $DOCKER_MACHINE_NAME) | |
| ``` |
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 | |
| # tput_colors - Demonstrate color combinations. http://linuxcommand.org/lc3_adv_tput.php | |
| for fg_color in {0..7}; do | |
| set_foreground=$(tput setaf $fg_color) | |
| for bg_color in {0..7}; do | |
| set_background=$(tput setab $bg_color) | |
| echo -n $set_background$set_foreground | |
| printf ' F:%02s B:%02s ' $fg_color $bg_color |
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
| var http = require('http'); | |
| var dup = require('./ped-duplex-stream.js'); | |
| var staticServer = require('ecstatic')({ root: __dirname + '/public' }); | |
| // Set up application data server | |
| var server = http.createServer(function(req, res) { | |
| if (req.url == '/api') { | |
| res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| res.end('This is API data'); |
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
| # convert comes form graphicsmagick | |
| # https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/ | |
| # http://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/ | |
| # For Google / webmanifest | |
| echo 144 192 256 384 512 |xargs -n1 -I% convert ../wb-logo-base.png -resize % public/images/icon-%x%.png | |
| # favicon | |
| convert ../wb-logo-base.png -resize 16 public/images/favicon.ico |
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 | |
| ffmpeg -safe 0 -f concat -i <(printf "file '$PWD/%s'\n" ./*.wav) -c copy output.wav |
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/sh | |
| curl -XGET https://raw.githubusercontent.com/johnelliott/master/.vimrc > ~/.vimrc |
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
| PS1='\[\033[01;33m\]\u@\h\[\033[00m\] \[\033[00m\]\W \$ '; | |
| export PS1; | |
| PS2="\[\033[01;33m\]→ \\[\033[00m\]"; | |
| export PS2; |
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 ~/.bash_prompt; | |
| # Make NVM available | |
| export NVM_DIR="/Users/john/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
| # Case-insensitive globbing (used in pathname expansion) | |
| shopt -s nocaseglob; | |
| # Append to the Bash history file, rather than overwriting it |