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 bug.png -set filename:original %t -resize 1200 -canny 0x10+10%+30% -negate '%[filename:original]_out.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
ssh-keyscan -H YOUR.IP.GOES.HERE >> ~/.ssh/known_hosts |
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
hdiutil resize -size 30g ~/path/to/file.sparsebundle | |
# HELP | |
hdiutil resize -help |
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
require "csv" | |
require "pry" | |
rows = CSV.read("./ticktick.csv", headers: true) | |
rows = rows.select { |row| row["Completed Time"].nil? } | |
CSV.open("./ticktick2.csv", "w") do |csv| | |
csv << rows[0].headers | |
rows.each do |row| |
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
docker pull google/cloud-sdk:latest | |
docker run --rm -it docker.io/google/cloud-sdk:latest | |
gcloud auth activate-service-account --key-file=/google-service-account.json | |
# auto detect csv headers | |
# replace table contents with csv file | |
bq load --autodetect --replace mydb.mytable /data.csv |
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
unset RAILS_LOG_TO_STDOUT |
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
PGDATA=/usr/local/var/postgres pg_ctl start | |
// psql client commands | |
SHOW server_version; |
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 | |
# resize an image to 1024x104 with cropping | |
# set gravity to center, north, northeast etc | |
# outputs to `out` directory | |
mogrify -resize "1024x1024^" -gravity center -extent 1024x1024 -path out INPUT.jpg |
NewerOlder