Skip to content

Instantly share code, notes, and snippets.

View I'm an early 🐤
🌞 Morning 86 commits ████▊░░░░░░░░░░░░░░░░ 23.0%
🌆 Daytime 172 commits █████████▋░░░░░░░░░░░ 46.0%
🌃 Evening 92 commits █████▏░░░░░░░░░░░░░░░ 24.6%
🌙 Night 24 commits █▎░░░░░░░░░░░░░░░░░░░ 6.4%
topaztee /
Created Jan 5, 2021
script to delete all test databases
# drop all test databases
sql="select datname from pg_database where datname like '%test_%'"
dbDelNames=`psql -U postgres -t -A -c "$sql"`
for dbName in ${dbDelNames[@]}
echo -e "\n\n[INFO] Drop $dbName.\n"
dropdb $dbName
View gist:ba8afe0e6e8d0a088dcc49e5f89d7dc8
Show all resolved comments in a Github Pull Request
topaztee /
Created Jul 31, 2020
iphone live photos are .heic formats which most sites dont accept. This script converts .heic files to jpg
ls -1 *.heic | xargs -n 1 bash -c 'convert "$0" "${0%.*}.jpg"'
topaztee / main.go
Created Apr 28, 2019
go run main.go && go tool trace trace.out
View main.go
package main
import (
func main() {
f, err := os.Create("trace.out")
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
#settings for go path
export GOPATH=$HOME/go
# Path to your oh-my-zsh installation.
export ZSH=/Users/topaztee/.oh-my-zsh
topaztee / slack.go
Last active Jun 6, 2022
send slack message in golang
View slack.go
package slack
import (
func Firehose() Slack {
return Slack{