Skip to content

Instantly share code, notes, and snippets.

Current strategy

$  ./zenbot.sh trade gdax.eth-USD --trend_ema 20 -period 7m --max_slippage_pct 0.48 --poll_trades 6000 --order_poll_time 6000 --order_adjust_time 6000 --oversold_rsi_periods=1000 --oversold_rsi=1000 --rsi_periods=1100 --neutral_rate=0.1 --max_sell_loss_pct=0.85 --max_buy_loss_pct=5 --buy_pct=100 --sell_pct=100 --selector gdax.eth-usd  --markup_sell_pct 0.25  --markdown_buy_pct 0.00  --reset-profit

The role of buy & sell percentages (PCT)

@brianunlam
brianunlam / authenticator.js
Created January 30, 2020 18:02 — forked from peterhughesdev/authenticator.js
Diffusion Authenticator example
let session = await diffusion.connect({
host: <host>,
principal: <admin username>,
credentials: <admin password>
});
let authenticator = {
authenticate(principal, credentials, sessionProperties, proposedProperties, callback) {
console.log('Auth:', principal, proposedProperties);
@brianunlam
brianunlam / tmux.md
Last active May 31, 2019 15:23 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@brianunlam
brianunlam / manpath-wrong
Created April 26, 2019 22:32 — forked from zeroc0d3/manpath-wrong
Fix: "manpath: can't set the locale; make sure $LC_* and $LANG are correct"
## Problem
When login in, the shell prints:
```
manpath: can't set the locale; make sure $LC_* and $LANG are correct
```
## Solution
```
sudo locale-gen "en_US.UTF-8"
sudo dpkg-reconfigure locales
@brianunlam
brianunlam / manpath-wrong
Created April 26, 2019 22:15 — forked from seafooler/manpath-wrong
Fix: "manpath: can't set the locale; make sure $LC_* and $LANG are correct"
## Problem
When login in, the shell prints:
```
manpath: can't set the locale; make sure $LC_* and $LANG are correct
```
## Solution
```
sudo locale-gen "en_US.UTF-8"
sudo dpkg-reconfigure locales
@brianunlam
brianunlam / iterm2.md
Created March 25, 2019 18:31 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@brianunlam
brianunlam / gist:7db3afea7fd0b1f42a2ed7c87f31d371
Created March 7, 2019 22:04 — forked from johanmeiring/gist:3002458
"git lg" alias for pretty git log
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
@brianunlam
brianunlam / git_branch_prompt.sh
Created March 2, 2019 23:19 — forked from maumercado/git_branch_prompt.sh
Git branch in prompt
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
L_YELLOW="\[\033[1;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[1;34m\]"
NO_COLOUR="\[\033[0m\]"
CYAN="\[\033[0;36m\]"
PURPLE="\[\033[0;35m\]"
# Determine active Python virtualenv details.