Skip to content

Instantly share code, notes, and snippets.

View bukowa's full-sized avatar

Mateusz Kurowski bukowa

View GitHub Profile
@bukowa
bukowa / main.rs
Created June 30, 2024 23:34
win32job
use std::{env, io};
use std::io::ErrorKind;
use std::process::{Command, Stdio};
fn main() -> Result<(), std::io::Error> {
// Collect the command and its arguments from the command line input
let args: Vec<String> = env::args().collect();
// Find the position of "--" which separates the wrapper's arguments from the subcommand's arguments
let separator_pos = args.iter().position(|arg| arg == "--").unwrap_or(1);
@bukowa
bukowa / run.js
Last active July 1, 2024 20:07
tribal wars 2 dupe script resources duplication script bot
function run_dupe(_RESOLVE) {
// nie zmieniaj wioski jak skrypt dziala
// jak skonczy rekrutowac to odswiez przegladarke
// co chcesz rekrutowac
// jesli pusty policzymy najlepszy
let recruitUnit = "";
// co chcesz wyslac
const sendUnit = "spear";
+ node --test --test-force-exit --test-timeout=90000 tests-e2e-js/dist/main.js
TAP version 13
# [ [DEBUG] default - {
# PATH_TAURI_APP_BINARY: 'D:\\\\a\\\\tauri-e2e\\\\tauri-e2e/target/release/tauri-app.exe',
# PATH_WEBDRIVER_BINARY: 'D:\\\\a\\\\tauri-e2e\\\\tauri-e2e/.build/bin/msedgedriver.exe',
# SELENIUM_WEBDRIVER_HOST: '127.0.0.1',
# SELENIUM_WEBDRIVER_PORT: '5699',
# SELENIUM_WEBDRIVER_LOG_LEVEL: 'DEBUG',
# TESTS_LOG_LEVEL: 'debug',
# TESTS_TIMEOUT: 45000
@bukowa
bukowa / err
Created June 26, 2024 03:20
bug
--- Process 9136 created
--- Process 9136 loaded C:\Windows\System32\ntdll.dll at 00007ffbd4670000
--- Process 9136 loaded C:\Windows\System32\kernel32.dll at 00007ffbd2b80000
--- Process 9136 loaded C:\Windows\System32\KernelBase.dll at 00007ffbd2050000
--- Process 9136 loaded C:\Windows\System32\apphelp.dll at 00007ffbcf570000
--- Process 9136 thread 4404 created
--- Process 9136 loaded C:\Windows\System32\user32.dll at 00007ffbd4490000
--- Process 9136 loaded C:\Program Files\Git\usr\bin\msys-2.0.dll at 0000000210040000
--- Process 9136 thread 1860 created
--- Process 9136 loaded C:\Windows\System32\win32u.dll at 00007ffbd1fb0000
@bukowa
bukowa / log
Created June 25, 2024 22:08
sh rust crash
--- Process 44996 created
--- Process 44996 loaded C:\Windows\System32\ntdll.dll at 00007ffcd6f30000
--- Process 44996 loaded C:\Windows\System32\kernel32.dll at 00007ffcd5d50000
--- Process 44996 loaded C:\Windows\System32\KernelBase.dll at 00007ffcd45f0000
--- Process 44996 loaded C:\Windows\System32\bcryptprimitives.dll at 00007ffcd4ab0000
--- Process 44996 thread 51044 created
--- Process 44996 thread 42460 created
--- Process 44996 loaded C:\Windows\System32\ucrtbase.dll at 00007ffcd4d40000
--- Process 44996 loaded C:\Windows\System32\vcruntime140.dll at 00007ffcce950000
--- Process 44996 thread 46256 created
Available recipes:
--- Process 19492 created
--- Process 19492 loaded C:\Windows\System32\ntdll.dll at 00007ffcd6f30000
--- Process 19492 loaded C:\Windows\System32\kernel32.dll at 00007ffcd5d50000
--- Process 19492 loaded C:\Windows\System32\KernelBase.dll at 00007ffcd45f0000
--- Process 19492 loaded C:\Windows\System32\bcryptprimitives.dll at 00007ffcd4ab0000
--- Process 19492 thread 41904 created
--- Process 19492 loaded C:\Windows\System32\shell32.dll at 00007ffcd66a0000
--- Process 19492 loaded C:\Windows\System32\msvcp_win.dll at 00007ffcd4b40000
--- Process 19492 loaded C:\Windows\System32\ucrtbase.dll at 00007ffcd4d40000
@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 \
@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 / 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)",
{
"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"
],