Skip to content

Instantly share code, notes, and snippets.

View cmdallas's full-sized avatar

cmdallas

  • Seattle
View GitHub Profile
@cmdallas
cmdallas / dev-sync.sh
Last active May 24, 2022 09:32
Sync to remote dev server
#!/bin/bash
# syncs the current project (as defined by git repo) to default instance
# get the path to the project root (where the .git folder is)
project_path=$(git rev-parse --show-toplevel 2> /dev/null)
devIp="89.149.218.170"
target="${TARGET:-$devIp}"
if [ $? -eq 0 ]; then
// Component
class App extends Component {
constructor(props) {
super(props);
this.state = { counter: 0 };
}
render() {
return (
@cmdallas
cmdallas / asdf_zsh_config
Created March 31, 2019 05:34
asdf zsh configuration
# Add this to ~/.zshrc after asdf has been installed
ASDF_DIR="$HOME/.asdf"
ASDF_COMPLETIONS="$ASDF_DIR/completions"
# Add asdf to PATH
#
# if in $PATH, remove, regardless of if it is in the right place (at the front) or not.
# replace all occurrences - ${parameter//pattern/string}
ASDF_BIN="${ASDF_DIR}/bin"
@cmdallas
cmdallas / willy.pine
Last active June 8, 2018 06:24
Trading View script for the willy
study(title="TheWilly", shorttitle="TheWilly")
length = input(21, minval=1)
upper = highest(length)
lower = lowest(length)
out = 100 * (close - upper) / (upper - lower)
src = out, len = input(14, minval=1, title="Length")
out2 = ema(out, len)
plot(out, color=#00f9ff, linewidth=2)
plot(out2, title="EMA", color=#fd00ff, linewidth=2)
band1 = hline(-20)
@cmdallas
cmdallas / sh.py
Last active January 26, 2018 20:58
def sh(*args):
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
stdout, _ = proc.communicate()
return stdout
@cmdallas
cmdallas / bittrex_btc_markets.txt
Created December 20, 2017 16:11
Bittrex BTC markets for Trading View
BITTREX:ZENBTC,BITTREX:ZECBTC,BITTREX:ZCLBTC,BITTREX:XZCBTC,BITTREX:XWCBTC,BITTREX:XVGBTC,BITTREX:XVCBTC,BITTREX:XSTBTC,BITTREX:XRPBTC,BITTREX:XMYBTC,BITTREX:XMRBTC,BITTREX:XMGBTC,BITTREX:XLMBTC,BITTREX:XEMBTC,BITTREX:XELBTC,BITTREX:XDNBTC,BITTREX:XCPBTC,BITTREX:XAURBTC,BITTREX:WINGSBTC,BITTREX:WAVESBTC,BITTREX:VTRBTC,BITTREX:VTCBTC,BITTREX:VRMBTC,BITTREX:VRCBTC,BITTREX:VOXBTC,BITTREX:VIABTC,BITTREX:UNOBTC,BITTREX:UNBBTC,BITTREX:UBQBTC,BITTREX:TXBTC,BITTREX:TRUSTBTC,BITTREX:TRSTBTC,BITTREX:TRIGBTC,BITTREX:TKSBTC,BITTREX:TKNBTC,BITTREX:TIMEBTC,BITTREX:THCBTC,BITTREX:SYSBTC,BITTREX:SYNXBTC,BITTREX:SWTBTC,BITTREX:SWIFTBTC,BITTREX:STRATBTC,BITTREX:STORJBTC,BITTREX:STEEMBTC,BITTREX:STARTBTC,BITTREX:SPRBTC,BITTREX:SPHRBTC,BITTREX:SNTBTC,BITTREX:SNRGBTC,BITTREX:SNGLSBTC,BITTREX:SLSBTC,BITTREX:SLRBTC,BITTREX:SIBBTC,BITTREX:SHIFTBTC,BITTREX:SEQBTC,BITTREX:SCBTC,BITTREX:SBDBTC,BITTREX:SAFEXBTC,BITTREX:RLCBTC,BITTREX:RISEBTC,BITTREX:REPBTC,BITTREX:RDDBTC,BITTREX:RBYBTC,BITTREX:RADSBTC,BITTREX:QWARKBTC,BITTREX:QTUMBTC,BI
@cmdallas
cmdallas / skywire_install.sh
Last active December 11, 2017 03:59
Skywire quickstart
# install
cd ${GOPATH}/src/github.com
mkdir skycoin && cd $_
git clone -b dev https://github.com/skycoin/skywire.git
dep ensure
cd $GOPATH/src/github.com/skycoin/skywire/cmd
go install ./...
# run
cd $GOPATH/bin
@cmdallas
cmdallas / pry.py
Last active December 5, 2017 06:23
Python equivalent to Ruby 'binding.pry'
import code; code.interact(local=dict(globals(), **locals()))
@cmdallas
cmdallas / install_go.sh
Last active December 15, 2017 05:26
Golang installation
yum update
yum upgrade
wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz
tar -xvf go1.9.2.linux-amd64.tar.gz
sudo mv go /usr/local
rm go1.9.2.linux-amd64.tar.gz
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
@cmdallas
cmdallas / bbs_board_creation.sh
Last active November 27, 2017 02:58
Create Skycoin BBS board using the api
curl http://127.0.0.1:7410/api/tools/new_seed
curl -X POST -F 'seed= ' -F 'alias=prblmchld' 'http://127.0.0.1:7410/api/session/users/new'
curl -X POST -F 'alias=prblmchld' 'http://127.0.0.1:7410/api/session/login'
curl -X POST -F 'seed= ' -F 'name=test1126' -F 'body=testing' 'http://127.0.0.1:7410/api/content/new_board'