docker rm container $(docker ps -a -q)
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
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
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
wget -k -E -r -l 10 -p -N -F -nH http://localhost:3000 | |
wget -P build -k -E -r -l 10 -p -N -F -nH http://localhost:3000 |
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
proxy=http://username:password@host:port |
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
# 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 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; |
NewerOlder