Some commands I use daily, kept here for my future environments
Go back on latest branch checked out
$ git checkout -
############################################################################################################ | |
################## ############################# | |
################## ############################# | |
This Gist collection contains all localstack related examples | |
################## ############################# | |
################## ############################# | |
############################################################################################################ |
# https://www.quantopian.com/posts/technical-analysis-indicators-without-talib-code | |
import numpy | |
import pandas as pd | |
import math as m | |
#Moving Average | |
def MA(df, n): | |
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n)) | |
df = df.join(MA) |
rsvg-convert -v > /dev/null 2>&1 || { echo "rsvg-convert is not installed, use: brew install librsvg." >&2; exit 1; } | |
ASSETS_FOLDER=$1 | |
if [ "$ASSETS_FOLDER" == "" ]; then | |
echo "Usage: $0 /path/to/svg/assets/" >&2 | |
exit 1 | |
fi | |
if [ ! -d "$ASSETS_FOLDER" ]; then |
/** | |
* Retries the given function until it succeeds given a number of retries and an interval between them. They are set | |
* by default to retry 5 times with 1sec in between. There's also a flag to make the cooldown time exponential | |
*/ | |
async function retry(fn, retriesLeft = 5, interval = 1000, exponential = false) { | |
try { | |
const val = await fn(); | |
return val; | |
} catch (error) { | |
if (retriesLeft) { |
2018-03-13 02:45:00 698.240 ETH-USD -0.12% 1 - 48.35 0.0036 0.0280 | |
2018-03-13 02:50:00 696.800 ETH-USD -0.21% 47 -- 44.84 -0.0119 0.0234 | |
2018-03-13 02:55:00 697.000 ETH-USD +0.02% 28 - 45.43 -0.0089 0.0227 | |
2018-03-13 03:00:00 695.970 ETH-USD -0.15% 26 -- 42.87 -0.0192 0.0229 | |
2018-03-13 03:05:00 695.990 ETH-USD +0.00% 31 -- 42.94 -0.0176 0.0223 | |
2018-03-13 03:10:00 693.490 ETH-USD -0.36% 74 -- 37.07 -0.0428 0.0165 sell | |
2018-03-13 03:15:00 692.790 ETH-USD -0.11% 183 -- 35.60 -0.0471 0.0176 sell | |
2018-03-13 03:20:00 688.270 ETH-USD -0.66% 267 --- 27.92 -0.0917 0.0201 sell | |
2018-03-13 03:25:00 691.960 ETH-USD +0.53% 68 -- 39.41 -0.0457 0.0275 sell | |
2018-03-13 03:30:00 692.180 ETH-USD +0.03% 21 -- 40.03 -0.0400 0.0280 sell |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
#!/bin/bash | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
# install homebrew-dupes (required to install zlib, php54's dependency) | |
brew tap homebrew/dupes | |
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
brew install nginx mysql |
#!/bin/bash | |
apt-get install mc htop git unzip wget curl -y | |
echo | |
echo "=====================================================" | |
echo " WELCOME" | |
echo "=====================================================" | |
echo | |
echo "Hub" |