Skip to content

Instantly share code, notes, and snippets.

View lemanschik's full-sized avatar
🚀
I Invent Coding Solutions. Languages, Tools, You name It

Frank Lemanschik lemanschik

🚀
I Invent Coding Solutions. Languages, Tools, You name It
View GitHub Profile
@lemanschik
lemanschik / removal_32.md
Created September 12, 2025 19:12
removal

IBM-compatible personal computers with Intel 80486 (i486) CPUs

Early Intel Pentium (P5/i586) machines

AMD 486-based systems (e.g., Am486, Elan SC400/SC410/SC450)

Cyrix 5x86 and 6x86 computers

VIA/Centaur C3/Cyrix III and WinChip PCs

@lemanschik
lemanschik / README.md
Last active September 10, 2025 05:33
Leetcode

An elegant way to solve this problem is to use a greedy approach. The goal is to minimize the number of deletions, which is equivalent to maximizing the number of elements we keep. We can build the longest possible "beautiful" subsequence by iterating through the input array nums from left to right.

Let's call the beautiful array we are constructing res. We'll process each number from nums and decide whether to add it to res.

The rules for a beautiful array depend on the new indices of the elements, specifically whether an index i is even or odd. This suggests that our decision to keep an element should depend on the current length of our res array.

Here's the greedy strategy:

  1. Initialize an empty list, let's call it beautiful_seq, which will store the elements we decide to keep.
  2. Iterate through each number num in the input array nums.
@lemanschik
lemanschik / vallheim_map.md
Created September 2, 2025 06:25
Example vallheim

Of course! This is a fantastic project. Here is a complete, self-contained HTML file that includes the CSS and JavaScript to do exactly what you want.

You can save this code as a single visualizer.html file and open it in your web browser. It will work entirely locally; no web server is needed.

Key Features of this Example:

  • File Pickers: Allows you to upload your map image (.png, .jpg) and your server log file.
  • Log Parser: Uses a Regular Expression to find all player position entries in the log.
  • Canvas Drawing: Renders your map and draws the parsed path on top of it.
  • Interactive Calibration: Includes input fields for you to tweak the scale and map dimensions in real-time to get a perfect alignment.
  • Clear Instructions: Guides you on how to find the correct calibration values.
@lemanschik
lemanschik / vallheim.md
Created September 2, 2025 06:21
vallheim.md

Excellent question! You've run into a classic problem in game map visualization, and your intuition is spot on. The "rounded map" is the absolute key to understanding the offset.

Let's break down exactly what's happening and how to fix it.

The Core Problem: Mismatched Coordinate Systems

You are dealing with two different coordinate systems:

  1. In-Game World Coordinates: These are the raw (X, Y, Z) coordinates your log parser is correctly reading. For a top-down map, we only care about (X, Z). This system is a perfect, flat Cartesian grid where the center of the world is (0, 0).
  2. Map Image Pixel Coordinates: This is the coordinate system of the PNG or JPEG file of your map. The origin (0, 0) is at the top-left corner. X increases to the right, and Y increases downwards.

If onClick the component fires first if onclick react fires first the default behavior is that all serialiseable props get attributes and properties so be aware that you could overwrite some default HTMLElement properties with intend or without :)

customElements.define('super-click', class SuperClick extends HTMLElement {
  connectedCallback() {
    alert('Comp');
    this.onclick = () => {
 alert('clicked');
@lemanschik
lemanschik / windows-process-list-parsing.md
Created December 6, 2024 08:50
Windows Process List Feature
console.log(process.argv[0],process.argv[1])
/**
  [ "12972", "chrome.exe",
      "\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --type=renderer --string-annotations=is-enterprise-managed=no --extension-process --enable-dinosaur-easter-egg-alt-images --video-capture-use-gpu-memory-buffer --lang=de --device-scale-factor=1 --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=15077 --time-ticks-at-unix-epoch=-1732904449134364 --launch-time-ticks=570270254831 --field-trial-handle=90356,i,1235959090738102457,11499441109469968414,262144 --variations-seed-version=20241121-182614.093000 --mojo-platform-channel-handle=69052 /prefetch:9"
    ],
 */
const arrayOfPids = execSync(`WMIC path win32_process get Caption,Processid,Commandline`).toString().split('\r\r\n').map(x=>x.replace(/ +/g, ' ').trim().split(" ")).map(x=>[x.pop(), x.slice(0,1).join(""),x.slice(1).join(" ") ]);
console.log(JSON.stringify({arrayOfPids},null,2))
@lemanschik
lemanschik / node.import.md
Created December 6, 2024 07:15
NodeJS Packaging export default special case

A Special case in node

export other
export default class me {}

Disables syntactic default import so translates to

// import * as me from 'above.js'
@lemanschik
lemanschik / WireGuard_Setup.txt
Created December 29, 2023 17:03 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@lemanschik
lemanschik / HowToOTGFast.md
Created December 3, 2023 10:04 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i