Skip to content

Instantly share code, notes, and snippets.

View andrzejsliwa's full-sized avatar
🎯
Focusing

Andrzej Śliwa andrzejsliwa

🎯
Focusing
  • VP Engineering / CTO / Architect / Polyglot Dev
  • Remote / Gorzów Wielkopolski POLAND
  • 02:52 (UTC +02:00)
  • X @andrzejsliwa
  • LinkedIn in/andrzejsliwa
View GitHub Profile
@andrzejsliwa
andrzejsliwa / migrate_settings.py
Last active May 25, 2026 12:17
Single-file, stdlib only, Python 3.7+. Tarkov 1.0 to SPT config migration script
#!/usr/bin/env python3
"""
Migrate values from a new-version Settings/ folder into an old-version sptSettings/
folder for SPT compatibility.
Strategy:
- sptSettings is the schema template ("placeholders"). Only keys/paths present
there are filled. Keys that exist only in the new Settings are dropped.
- Top-level "Version" is NEVER overwritten (it is the schema marker).
- Type mismatches between old and new are skipped and reported (would break
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema-preview",
"actions": [],
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{4f2bf769-ff6a-4593-a1e5-1c8f25b19f1c}",
"keybindings":
[
{
@andrzejsliwa
andrzejsliwa / steps.md
Created October 11, 2024 09:37 — forked from rajeshkumaravel/steps.md
Installing a Font in WSL (Windows Subsystem for Linux)

Installing a Font in WSL (Windows Subsystem for Linux)

To install a font in WSL, follow these steps:

  1. Check Font Location: Confirm that the font file (e.g., VictorMono.ttf) is located in a directory accessible from your WSL instance. You can copy the font file to your WSL home directory for simplicity.

  2. Install Font: You can use the fc-cache command to update the font cache in WSL and make the font available. Open a terminal in your WSL instance and run the following commands:

sudo cp /mnt/c/path/to/VictorMono.ttf /usr/local/share/fonts/

@andrzejsliwa
andrzejsliwa / .envrc
Created October 1, 2024 17:16 — forked from arianvp/.envrc
Use nix flakes with private github deps
#!/bin/sh
#If already set (e.g. in github actions); use that instead
if [ -z "$GITHUB_TOKEN" ]; then
nix run nixpkgs#gh auth status || nix run nixpkgs#gh auth login
GITHUB_TOKEN="$(nix run nixpkgs#gh auth token)"
export GITHUB_TOKEN
fi
NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN"
@andrzejsliwa
andrzejsliwa / .envrc
Created October 1, 2024 17:16 — forked from arianvp/.envrc
Use nix flakes with private github deps
#!/bin/sh
#If already set (e.g. in github actions); use that instead
if [ -z "$GITHUB_TOKEN" ]; then
nix run nixpkgs#gh auth status || nix run nixpkgs#gh auth login
GITHUB_TOKEN="$(nix run nixpkgs#gh auth token)"
export GITHUB_TOKEN
fi
NIX_CONFIG="access-tokens = github.com=$GITHUB_TOKEN"
@andrzejsliwa
andrzejsliwa / app.yaml
Created July 24, 2024 13:54 — forked from alukach/app.yaml
An example Github Actions for Python + Pipenv + Postgres + Pyright
# .github/workflows/app.yaml
name: My Python Project
on: push
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
@andrzejsliwa
andrzejsliwa / TUTORIAL.md
Last active July 19, 2024 11:09
Simple tutorial for using pyenv and pipenv all together (seamlessly)

Simple tutorial for using pyenv and pipenv all together (seamlessly)

Setup

Install pyenv & pipenv:

brew install pyenv pipenv

Add to your .bashrc:

@andrzejsliwa
andrzejsliwa / gcloud-fiters.sh
Created July 18, 2024 11:25 — forked from rezamt/gcloud-fiters.sh
GCloud Filter Examples
List all Google Compute Engine instance resources:
$ gcloud compute instances list
List Compute Engine instance resources that have machineType f1-micro:
$ gcloud compute instances list --filter="machineType:f1-micro"
List Compute Engine instance resources with zone prefix us and not
MachineType f1-micro:
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
#include <c64.h>
#include <stdio.h>
unsigned byte* const SCREEN = (char*)$0400;
void main() {
fillscreen(SCREEN, $20);
charset();
}