docker rm container $(docker ps -a -q)
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 i in {1..1000} ; do | |
| echo "thing" | |
| sleep 3 | |
| done |
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 input.png -resize 50% output.png |
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
| # list indexes | |
| curl -X GET "localhost:9200/_aliases" | |
| # remove readonly | |
| curl -X PUT "localhost:9200/recipes/_settings" -H 'Content-Type: application/json' -d' | |
| { | |
| "index": { | |
| "blocks.read_only": false, |
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
| defaults write com.google.Chrome SyncDisabled -bool true | |
| defaults write com.google.Chrome RestrictSigninToPattern -string ".*@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
| diskutil list | |
| # diskutil unmountDisk /dev/diskN | |
| diskutil unmountDisk /dev/disk3 | |
| sudo dd bs=1m if=2017-06-21-raspbian-jessie.img of=/dev/rdiskN |
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
| cat nginx.access.log | cut -d ' ' -f3 | sort | uniq -c | sort -r -g | head -n10 |
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
| max = 10.to_f | |
| cols = 3 | |
| target = (max/cols).ceil | |
| (0..max).to_a.slice_before(target: target) do |i,state| | |
| if i > state[:target] | |
| state[:target] += state[:target] | |
| true | |
| else | |
| false |
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
| #!/usr/bin/env ruby | |
| require 'pty' | |
| @script = "./rand.rb" | |
| @interval = 5 | |
| def start | |
| puts 'starting' |
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 imagemagick | |
| ==> /usr/local/Cellar/imagemagick/6.8.6-3 | |
| $ brew install pkgconfig | |
| ==> /usr/local/Cellar/pkg-config/0.28 | |
| $ C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.6-3/include/ImageMagick-6 PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.6-3/lib/pkgconfig/ gem install rmagick | |
| Successfully installed rmagick-2.13.2 | |
| C_INCLUDE_PATH=/usr/local/Cellar/imagemagick@6/6.9.8-4/include/ImageMagick-6 PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick@6/6.9.8-4/lib/pkgconfig/ gem install rmagick -v '2.16.0' |