Skip to content

Instantly share code, notes, and snippets.

View kamontat's full-sized avatar
💭
I may be slow to respond.

Kamontat Chantrachirathumrong kamontat

💭
I may be slow to respond.
View GitHub Profile
{
"name": "test",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.3.0",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@next/font": "13.1.6",
"@react-google-maps/api": "^2.18.1",
"@types/braintree-web-drop-in": "^1.28.0",
"@types/google.maps": "^3.51.0",
{
"max_open_trades": 3,
"stake_currency": "BTC",
"stake_amount": 0.01,
"tradable_balance_ratio": 0.99,
"fiat_display_currency": "USD",
"timeframe": "5m",
"dry_run": true,
"cancel_open_orders_on_exit": false,
"unfilledtimeout": {
#!/usr/bin/env bash
banner() {
echo
echo "----------------------------------------"
echo "$@"
echo "----------------------------------------"
echo
}
@kamontat
kamontat / docker-compose.yml
Last active January 31, 2023 10:14
for article `setup-freqtrade-with-grafana`
version: "3"
# persistant grafana and prometheus data
# to get more detail you can run `docker volume --help`
volumes:
grafana-data:
prometheus-data:
services:
freqtrade:
{"schemas":{"AccessAndRefreshToken":{"title":"AccessAndRefreshToken","required":["access_token","refresh_token"],"type":"object","properties":{"access_token":{"title":"Access Token","type":"string"},"refresh_token":{"title":"Refresh Token","type":"string"}}},"AccessToken":{"title":"AccessToken","required":["access_token"],"type":"object","properties":{"access_token":{"title":"Access Token","type":"string"}}},"AvailablePairs":{"title":"AvailablePairs","required":["length","pairs","pair_interval"],"type":"object","properties":{"length":{"title":"Length","type":"integer"},"pairs":{"title":"Pairs","type":"array","items":{"type":"string"}},"pair_interval":{"title":"Pair Interval","type":"array","items":{"type":"array","items":{"type":"string"}}}}},"Balance":{"title":"Balance","required":["currency","free","balance","used","est_stake","stake"],"type":"object","properties":{"currency":{"title":"Currency","type":"string"},"free":{"title":"Free","type":"number"},"balance":{"title":"Balance","type":"number"},"used":{"t
@kamontat
kamontat / lecture-1.md
Last active April 24, 2021 07:58
Intro to programming

Data type

  1. Number - Int / Float - ตัวเลข
  2. Boolean - ค่าความเป็นจริงหรือเท็จ
  3. Character - ตัวอักษร
  4. String / Text

Int (Integer) จำนวนเต็ม

0, 1, 2, 3, 10, 100

# This is Git's per-user configuration file.
[user]
name = Kamontat Chantrachirathumrong
# email = developer@kamontat.net
email = kamontat.chantrachirathumrong@agoda.com
# signingKey = 705CB6B32BBCBABA
signingKey = DD18B41623EB11D1
[alias]
com = commit
@kamontat
kamontat / helper.sh
Last active June 16, 2019 05:37
helper method for bash scripts
#!/usr/bin/env bash
# shellcheck disable=SC1000
# generate by create-script-file v4.0.1
# link (https://github.com/Template-generator/create-script-file/tree/v4.0.1)
# set -x #DEBUG - Display commands and their arguments as they are executed.
# set -v #VERBOSE - Display shell input lines as they are read.
# set -n #EVALUATE - Check syntax of the script but don't execute.
@kamontat
kamontat / convert.py
Created February 18, 2019 07:26
convert facebook information encode to correct one (only appear when export as JSON)
import json
def parse_obj(obj):
for key in obj:
if type(obj[key]) is str:
obj[key] = obj[key].encode('latin_1').decode('utf-8')
elif type(obj[key]) is list:
obj[key] = list(map(lambda x: x if type(x) != str else x.encode('latin_1').decode('utf-8'), obj[key]))
pass
return obj