Skip to content

Instantly share code, notes, and snippets.

View stevenvo's full-sized avatar

Steven Vo stevenvo

View GitHub Profile
@stevenvo
stevenvo / sql.sql
Last active January 29, 2018 23:13
Database Useful SQLs
-- Redshift - Query usage --
select
sum(capacity)/1024 as capacity_gbytes,
sum(used)/1024 as used_gbytes,
(sum(capacity) - sum(used))/1024 as free_gbytes
from
stv_partitions where part_begin=0;
-- usage by tables --
@stevenvo
stevenvo / git.cmd
Last active January 28, 2018 21:30
Useful Git Command
# Pulling a git repository as a git module into your project
# "master" is the branch of the remote repository to use
git submodule add -b master https://github.com/Komodo/trackchanges.git src/modules/trackchanges
# get status recursively
git submodule status --recursive
# Iterate through all git submodule to add and comment and commit
@stevenvo
stevenvo / jasonette.json
Last active May 31, 2019 22:32
jasonette.json
{
"$jason": {
"head": {
"title": "{ ˃̵̑ᴥ˂̵̑}",
"actions": {
"$foreground": {
"type": "$reload"
}
}
},
@stevenvo
stevenvo / s3_cp.sh
Created June 19, 2019 01:11
Download file from S3 - Recursive, include/exclude patterns
aws s3 cp s3://<bucket_name> <local_folder>/ --recursive --exclude "*" --include "*201906*json" --include "*201906*pColdStart*" --exclude "*baseline*" --exclude "*candidate*"
@stevenvo
stevenvo / struct.go
Last active July 27, 2020 00:32
Struct #go #struct
// Definition
type identifier struct {
field1 type1
field2 type2
...
}
// Example struct defintion for use below
type struct1 struct { // struct definition
i1 int