Skip to content

Instantly share code, notes, and snippets.

View saleh-old's full-sized avatar

Saleh O saleh-old

View GitHub Profile
@property
def atr(self):
return ta.atr(self.candles)
@property
def long_ema(self):
return ta.ema(self.candles, 50)
@property
def short_ema(self):
return ta.ema(self.candles, 21)
from jesse.strategies import Strategy
import jesse.indicators as ta
from jesse import utils
class SampleTrendFollowing(Strategy):
def should_long(self) -> bool:
return False
def should_short(self) -> bool:
brew install unrar
@saleh-old
saleh-old / format-flash-man.sh
Created December 31, 2019 15:47
Fix a flash dirve formatted for Ubuntu/macOS installer on mac
# find the device name by listing all external volumes
diskutil list external
# format it
sudo diskutil eraseDisk FAT32 UPPERCASE-NAME FULL_DEVICE_ADDRESS
# example
diskutil eraseDisk FAT32 SULLY /dev/disk3
https://coderwall.com/p/ds2dha/word-line-deletion-and-navigation-shortcuts-in-iterm2
and
https://stackoverflow.com/a/48002681/11126038
@saleh-old
saleh-old / jesse-ubuntu.bash
Last active July 31, 2019 06:41
installation commands for Jesse 2.0 on Ubuntu 18.04
# initital update
sudo apt -y update
sudo apt-get -y upgrade
# create new user
adduser jesse
adduser jesse sudo
# close the terminal and login with jesse:
ssh-jesse
sudo apt-get update
# install Oh My Zsh
apt install zsh
sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# too add aliases
nano ~/.zshrc
# of course, skip steps that you already have done before
# update homebrew
brew update
# install php 7.3 (although +7.1 would do)
brew install [email protected]
# make sure php version is 7.3. On a new terminal tab run:
php -v
# install
wget https://git.io/vpnsetup -O vpnsetup.sh && sudo sh vpnsetup.sh
# To add new users
wget -O add_vpn_user.sh https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/extras/add_vpn_user.sh
sudo sh add_vpn_user.sh 'username_to_add' 'password_to_add'
# For Android users, edit /etc/ipsec.conf and edit sha2-truncbug=yes to sha2-truncbug=no
# Clients are set to use Google Public DNS when the VPN is active.