Skip to content

Instantly share code, notes, and snippets.

View stevenvo's full-sized avatar

Steven Vo stevenvo

  • GeoComply
  • Bay Area
View GitHub Profile
@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
@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 / jasonette.json
Last active May 31, 2019 22:32
jasonette.json
{
"$jason": {
"head": {
"title": "{ ˃̵̑ᴥ˂̵̑}",
"actions": {
"$foreground": {
"type": "$reload"
}
}
},
@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 / 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 / .gitignore
Created October 24, 2017 22:53
Python .gitignore
*.DS_Store
*.pyc
@stevenvo
stevenvo / xz.sh
Last active October 22, 2017 07:54
uncompress xz file
$ brew install xz
$ xz -d to-extract.xz
@stevenvo
stevenvo / gist:f34ff09f089584dabe85af3b5bc1583f
Created July 8, 2017 08:33
install imagemagick 6 on osx
brew install imagemagick@6
brew link --force imagemagick@6
bundle install rmagick
@stevenvo
stevenvo / claymore.stub.conf
Created July 5, 2017 07:03
ETH & SC mining
-colors 4
-dbg -1
-gser 2
-fanmin 55
-tt 70
-ttli 75
-r 1
-erate 1
-estale 1
-etha 0
@stevenvo
stevenvo / useful_python_snippets.py
Last active January 13, 2018 21:56
Useful python snippets
#############################################################################
# Generate Dict from a List of Dict
ticker = [
{
'symbol': 'ABC',
'price': 100.0
},
{
'symbol': 'CDE',
'price': 105.0