Skip to content

Instantly share code, notes, and snippets.

asmega / process.rb
Last active Jul 18, 2021
ticktick csv export
View process.rb
require "csv"
require "pry"
rows ="./ticktick.csv", headers: true)
rows = { |row| row["Completed Time"].nil? }"./ticktick2.csv", "w") do |csv|
csv << rows[0].headers
rows.each do |row|
asmega / gist:7cd47caafc02a0ff51d83444ce98e014
Last active Jul 9, 2021
simplest way to upload csv google bigquery
View gist:7cd47caafc02a0ff51d83444ce98e014
docker pull google/cloud-sdk:latest
docker run --rm -it
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
asmega /
Created Nov 23, 2020
prevent rails from logging to stdout
View gist:9cdc2f790abeea468e8f11d534df6cbd
PGDATA=/usr/local/var/postgres pg_ctl start
// psql client commands
SHOW server_version;
brew info node
# switch version
brew switch icu4c 63.1
View gist:cf1ff0e61b98c5349a5740f6a00bcdcb
# adjust brightness in smaller increments
Shift (⇧) + Option (alt) + Brightness
asmega /
Created Jul 12, 2019
image manipulation
# correctly orientate images
mogrify -auto-orient *.jpg
View gist:ca12594f47c2f77ab60c6dfe54ce83ee


Delete all containers

docker rm container $(docker ps -a -q)

Delete all images