Skip to content

Instantly share code, notes, and snippets.

View ivanfoong's full-sized avatar

ivanfoong ivanfoong

View GitHub Profile
@ivanfoong
ivanfoong / builder.json
Created March 30, 2025 05:28
Sample n8n workflow builder
{
"nodes": [
{
"parameters": {
"path": "generate-workflow",
"methods": [
"POST"
]
},
"name": "Webhook",
@ivanfoong
ivanfoong / docker-compose.yaml
Created December 1, 2021 12:48
Elasticsearch docker compose
version: '3.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
@ivanfoong
ivanfoong / gist:f43572e61ad1d1072edf473bd299da00
Created March 2, 2018 02:56 — forked from carlos8f/gist:b09a734cf626ffb9bb3bcb1ca35f3db4
zenbot sim result, BTC-USD, 90 days, 195.45% profit, 61.06% over buy/hold
2017-05-11 16:00:00 1832.97 USD -0.06% 619.75 + 0.0447 null 1.91% 0.031060 BTC 2897.41 USD 195.43% +61.48%
{ days: 90,
profit_stop_enable_pct: 10,
profit_stop_pct: 1,
sell_rate: -0.006,
trend_ema: 36,
period: '1h',
strategy: 'trend_ema_rate',
sell_stop_pct: 4,
buy_stop_pct: 0,
@ivanfoong
ivanfoong / install_xgboost_mac.sh
Created February 23, 2018 04:51
Install xgboost on mac
# from https://www.kaggle.com/c/liberty-mutual-group-property-inspection-prediction/discussion/15742#142059
git clone --recursive https://github.com/dmlc/xgboost.git
cd xgboost/
./build.sh
pip install -e python-package
@ivanfoong
ivanfoong / ExampleViewController.swift
Last active December 5, 2017 02:13
Generic wrapper for Observable values
class ViewModel {
var content: Observable<String?> = Observable(nil)
func seedContent() {
self.content.value = "Seeded content"
}
}
class ExampleViewController {
@IBOutlet weak var contentTextField: UITextField!
[
{
"elementType": "geometry",
"stylers": [
{
"color": "#152230"
}
]
},
{
@ivanfoong
ivanfoong / scenelayer.html
Last active August 23, 2017 05:35
ArcGIS 3D Building
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Visualize a Scene Layer with continuous color - 4.4</title>
<style>
html,
body,
#viewDiv {
@ivanfoong
ivanfoong / index.html
Created August 7, 2017 02:56
OSM WebGL 3D Building
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>WebGL Version</title>
<link rel='stylesheet prefetch' href='https://cdn.osmbuildings.org/OSMBuildings-GLMap-2.0.0/GLMap/GLMap.css'>
<link rel="stylesheet" href="style.css">
</head>
<body>
@ivanfoong
ivanfoong / index.html
Created August 7, 2017 02:53
OSM Leaflet 3D Building
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Interaction</title>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/leaflet.css'>
<link rel="stylesheet" href="style.css">
</head>
<body>
keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android -v