Skip to content

Instantly share code, notes, and snippets.

View bukowa's full-sized avatar

Mateusz Kurowski bukowa

View GitHub Profile
@bukowa
bukowa / pycharmbug.ipynb
Last active October 22, 2023 17:29
pycharmbug.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bukowa
bukowa / ATASPythonSocket.csproj
Last active September 23, 2025 10:27
ATASPythonSocket
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="ATAS.Indicators">
@bukowa
bukowa / parse.py
Created December 7, 2023 23:19
rithmic connection params generator for c sharp
# loop over all files in the current folder
# and process the file if the name ends with _connection_params.txt
import os
import re
import sys
@bukowa
bukowa / run.py
Created December 28, 2023 11:40
change visibility of all gitlab projects
import gitlab
# Replace these values with your GitLab information
gitlab_url = "https://gitlab.com"
private_token = ""
group_id = ""
# Create a GitLab API connection
gl = gitlab.Gitlab(gitlab_url, private_token=private_token)
@bukowa
bukowa / metaeditor.ini
Created December 28, 2023 20:26
mql4 darcula pitch black
[Colors]
Color0=0
Color1=14013135
Color2=14013135
Color3=8478743
Color4=0
Color5=3307724
Color6=9079434
Color7=11117660
Color8=14013135
@bukowa
bukowa / appendmenu.py
Created May 11, 2024 08:18
silent hunter 3 append menu item
import configparser
import os
def replace_second_occurrence(_text, _old, _new):
first_index = _text.find(_old)
if first_index != -1: # If the substring exists
second_index = _text.find(_old, first_index + 1)
if second_index != -1: # If a second occurrence exists
# Replace the second occurrence
return _text[:second_index] + _text[second_index:].replace(_old, _new, 1)
{
"0": {
"file": "common\\genes\\05_genes_special_accessories_clothes.txt",
"count": 4,
"mods": [
"Unofficial Patch",
"Community Flavor Pack",
"Ethnicities and Portraits Expanded",
"CFP + EPE Compatibility Patch"
],
@bukowa
bukowa / example.json
Last active June 1, 2024 21:21
example.json
{
"database": {
"unofficialpatch": {
"name": "Unofficial Patch",
"loadBefore": {
"*": {}
}
},
"rice": {
"name": "Regional Immersion and Cultural Enrichment (RICE)",
@bukowa
bukowa / gitchanged.sh
Last active June 15, 2024 00:34
grab github changed files to json array with jq
#!/bin/bash -l
set -euxo pipefail
# Source first argument if it exists
if [ -n "${1-}" ]; then
set -o allexport
source "$1"
set +o allexport
fi
@bukowa
bukowa / justfile
Created June 25, 2024 15:41
jq create arguments from json
# 1. '-b' flag in jq gets rid of the line breaks
# which is problematic on windows CLRF
# 2. '| xargs' after jq is used to trim the extra quotes
# that are problematic when passing the arguments to other
# command into a subshell
# get the arguments for the e2e tests
_get_e2e_args:
#!/bin/bash
jq -b -n -r --slurpfile b .build/.build_data.json \