Skip to content

Instantly share code, notes, and snippets.

View full-sized avatar

Buk Bukowski bukowa

View GitHub Profile
@bukowa
bukowa / main.py
Last active September 2, 2023 12:44
mt4 sync copy
View main.py
import os
import shutil
from pathlib import Path
MT4_DIR = Path("C:\\Users\\buk\\AppData\\Roaming\\MetaQuotes\\Terminal\\")
MT4_MASTER = MT4_DIR / '2C68BEE3A904BDCEE3EEF5A5A77EC162'
BACKUP_DIR = MT4_DIR / 'backup'
CACHE_FILE = 'mqlcache.dat'
@bukowa
bukowa / README
Last active April 14, 2023 23:18
grafana freqtrade dashboard
View README
its WIP but works, just
1. run grafana if u dont have it docker run --rm -it -e GF_SECURITY_ADMIN_PASSWORD=admin -p 9312:3000 --network=host grafana/grafana
2. run run.py in folder above user_data
3. in grafana install plugin simplejson
4. make new data source in grafana simplejson with url http://localhost:3004
5. place config for your strategy in user_data/configs
i think it's all its not complete but works maybe someone can pick it up from here
@bukowa
bukowa / error
Created April 14, 2023 19:50
illegal
View error
Fatal Python error: Illegal instruction
Current thread 0x00007ff510b33740 (most recent call first):
File "<frozen importlib._bootstrap>", line 241 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 1176 in create_module
File "<frozen importlib._bootstrap>", line 571 in module_from_spec
File "<frozen importlib._bootstrap>", line 674 in _load_unlocked
File "<frozen importlib._bootstrap>", line 1006 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1027 in _find_and_load
File "/home/ftuser/.local/lib/python3.10/site-packages/pyarrow/__init__.py", line 65 in <module>
@bukowa
bukowa / Dockerfile
Created March 13, 2023 19:35
django Dockerfile
View Dockerfile
ARG PYTHON_VERSION="3.11"
FROM python:${PYTHON_VERSION}-slim as builder
ENV PYTHONUNBUFFERED 1
# todo HEALTHCHECK
# https://docs.docker.com/engine/reference/builder/#healthcheck
RUN apt-get update \
&& apt-get install -y \
wait-for-it \
@bukowa
bukowa / Makefile
Created February 17, 2023 14:21
supress silence quiet Makefile warning: overriding commands for target warning: ignoring old commands for target
View Makefile
include lib/include.mk
MAKEFILES_INCLUDES = help.mk print.mk git.mk
$(call include_makefiles_once,$(MAKEFILES_INCLUDES))
@bukowa
bukowa / cli.sh
Created February 15, 2023 03:08
bash cli with positional and named arguments
View cli.sh
#!/bin/bash
set -o errexit
force=false
reg_name='test'
reg_port='5001'
pos_args=()
while [ $# -gt 0 ]; do
arg="$1"
@bukowa
bukowa / Makefile
Created February 14, 2023 06:01 — forked from isaacs/Makefile
View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@bukowa
bukowa / bash-cheatsheet.sh
Created February 14, 2023 06:00 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View bash-cheatsheet.sh
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@bukowa
bukowa / Makefile.py
Created February 13, 2023 09:21
python makefile click autocomplete
View Makefile.py
import dataclasses
import selectors
import sys
import click
from colorama import Fore
@dataclasses.dataclass
class Command:
@bukowa
bukowa / bash.sh
Last active February 16, 2023 05:34
bash
View bash.sh
# spinner, progress bar
https://stackoverflow.com/questions/238073/how-to-add-a-progress-bar-to-a-shell-script/238094#238094
# kubectl get all api resources separated by comma
kubectl api-resources -o name | paste -sd, -
# gpg print signing keys
gpg --list-keys --with-colons | awk -F: '/^pub:/ { print $5 }'
# gpg generate and export