Skip to content

Instantly share code, notes, and snippets.

class MAcrossover(bt.Strategy):
#Moving Average Parameters
params = (('pfast',20),('pslow',50))
def log(self,txt,dt=None):
dt = dt or self.datas[0].datetime.date(0)
print('%s, %s' % (dt.isoformat(),txt))
def __init__(self):
self.dataclose = self.datas[0].close
# Order variable
self.order = None
@ace3
ace3 / sqn.userscript.js
Last active December 18, 2020 05:47
TamperMonkey
// ==UserScript==
// @name TradingView SQN Calculator
// @namespace https://ignizbot.com/
// @version 0.6
// @description try to take over the world!
// @author Ignasius Wahyudi
// @match https://www.tradingview.com/chart/*/
// @require https://unpkg.com/[email protected]/dist/math.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/date-fns/1.30.1/date_fns.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js
# Disable the newline at the start of the prompt
add_newline = false
# Wait 10 milliseconds for starship to check files under the current directory.
scan_timeout = 10
[battery]
full_symbol = "🔋"
charging_symbol = "⚡️"
discharging_symbol = "💀"
import { Dimensions, Platform, StatusBar } from 'react-native';
const X_WIDTH = 375;
const X_HEIGHT = 812;
const XSMAX_WIDTH = 414;
const XSMAX_HEIGHT = 896;
const { height: W_HEIGHT, width: W_WIDTH } = Dimensions.get('window');
  1. make .gitignore file.
  2. add node_modules/ line to .gitignore file
  3. run git rm -r --cached . && git add . && git commit -m "remove gitignore files" && git push

To setup push to multiple remote with single git push, you need to do this:

  • Clone the repo like usual
  • Setup multi remote URL like this
git remote set-url --add --push origin [email protected]:[username]/[repository]
git remote set-url --add --push origin [email protected]:[username]/[repository]

ADB Remove Bloatware

ADB into Devices

adb devices

Into shell Mode

adb shell
server {
server_name ace3;
# Set the port to listen on and the server name
listen 80 default_server;
# Set the document root of the project
root /var/www/html/public;
# Set the directory index files
FROM php:7.4-fpm
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
error_reporting=E_ALL