This file contains 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 info node | |
# switch version | |
brew switch icu4c 63.1 |
This file contains 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
# adjust brightness in smaller increments | |
Shift (⇧) + Option (alt) + Brightness |
This file contains 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
# correctly orientate images | |
mogrify -auto-orient *.jpg |
This file contains 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 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 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 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 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 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 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' |