Skip to content

Instantly share code, notes, and snippets.

View RavenXce's full-sized avatar
🎯
Focusing

Ivan Poon RavenXce

🎯
Focusing
View GitHub Profile
Verifying my identity on Peepeth.com 0x5be2f49d897a8c4603960c457ffb466527a28eae
@RavenXce
RavenXce / switcheo_token_script_hash
Created March 16, 2018 06:45
Switcheo Token contract script hash
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
The Switcheo Token contract script hash is:
78e6d16b914fe15bc16150aeb11d0c2a8e532bdd
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.0.76
Comment: https://keybase.io/crypto
wsFcBAABCgAGBQJaq2fSAAoJEO0bRKBDVfmXyDUQAJWJsnWvexQii0n+ATPGqw8Z
@RavenXce
RavenXce / keybase.md
Created February 9, 2018 04:40
keybase.md

Keybase proof

I hereby claim:

  • I am ravenxce on github.
  • I am ravenxce (https://keybase.io/ravenxce) on keybase.
  • I have a public key ASBpfS0ZuwJQ3WTbw-wolvYZ6SPMx3p44qL0rsFK81_t8wo

To claim this, I am signing this object:

@RavenXce
RavenXce / .bash_profile
Created September 28, 2016 07:27
bash profile for Grab golang repo
# Golang stuff
export GOPATH=$HOME/go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
# Grab stuff
source $GOPATH/src/github.com/myteksi/go/scripts/env-vars.sh '' -ci > /dev/null 2>&1
export REDIS_HOST=localhost
@RavenXce
RavenXce / I18nRuntimePlugin.js
Created April 12, 2016 11:23 — forked from valscion/I18nRuntimePlugin.js
Venuu I18n Webpack integration
var ConstDependency = require('webpack/lib/dependencies/ConstDependency');
var NullFactory = require('webpack/lib/NullFactory');
var _ = require('lodash');
function I18nRuntimePlugin(options) {
options = options || {};
this.functionNames = options.functionNames || ['I18n.t', 'I18n.translate'];
this.translationsPlaceholder = options.translationsPlaceholder || 'I18N_RUNTIME_TRANSLATIONS';
this.fullTranslations = options.fullTranslations || {};
}
@RavenXce
RavenXce / docker-postgres-backup-daily.sh
Last active March 21, 2016 11:54
Daily postgres backup for docker
#! /bin/bash
# directories to save backups in, must be mounted as a volume on docker: `-v $HOST_DIR:$DOCKER_DIR`
DOCKER_DIR="/tmp/backups-daily"
HOST_DIR="/var/backups/docker-postgres-daily"
S3_DIR="s3://docker-postgres-backups"
DATABASES=(kloudsec)
YMD=$(date "+%Y-%m-%d")
# make dir for date if it doesn't exist
@RavenXce
RavenXce / docker-postgres-backup-hourly.sh
Last active March 21, 2016 11:43
Hourly postgres backup for docker
#! /bin/bash
# directories to save backups in, must be mounted as a volume on docker: `-v $HOST_DIR:$DOCKER_DIR`
DOCKER_DIR="/tmp/backups-hourly"
HOST_DIR="/var/backups/docker-postgres-hourly"
TIME=$(date "+%Y%m%d-%H%M%S")
DATABASES=(kloudsec)
# make database backup for all dbs
CONTAINER_ID=$(docker ps | grep postgres | awk '{ print $1 }')
@RavenXce
RavenXce / .gitconfig
Created February 22, 2016 08:44
My gitconfig
[user]
name = Ivan Poon
email = ravenxce@gmail.com
[alias]
lol = log --pretty=oneline --abbrev-commit --graph --decorate
ds = diff --stat
[log]
decorate = short
[filter "media"]
clean = git-media-clean %f
@RavenXce
RavenXce / dokku-postgres-backup-hourly.sh
Last active November 26, 2015 13:09
Hourly postgres backup for dokku
#! /bin/bash
# directory to save backups in, must be rwx by postgres user
BASE_DIR="/var/backups/dokku-postgres/hourly"
TIME=$(date "+%Y%m%d-%H%M%S")
DIR="$BASE_DIR"
# make dir if it doesn't exist
mkdir -p $DIR
cd $DIR
@RavenXce
RavenXce / dokku-postgres-backup-daily.sh
Last active December 27, 2020 14:18
Daily postgres backup for dokku
#! /bin/bash
# directory to save backups in, must be rwx by postgres user
BASE_DIR="/var/backups/dokku-postgres"
YMD=$(date "+%Y-%m-%d")
DIR="$BASE_DIR/$YMD"
# make dir if it doesn't exist
mkdir -p $DIR
cd $DIR