Skip to content

Instantly share code, notes, and snippets.

View Iksas's full-sized avatar

Iksas

View GitHub Profile
@Iksas
Iksas / crypto_miner_removal.md
Created October 29, 2025 16:17
Crypto miner removal

Crypto miner removal

This manual describes how to remove a trojan I came across on someone else's machine.

The trojan seems to contain a crypto miner, and spreads through infecting USB sticks.

Here are hashes of the trojan's main files:

svctrl64.exe:

  • md5: b88b2c61844a49fcc54727105ae9abac
@Iksas
Iksas / nvidia_containers.md
Last active November 12, 2025 19:12
Nvidia GPUs inside of containers

Using Nvidia GPUs inside Podman / Docker containers

Install the Nvidia drivers as well as the container toolkit.

Setting up the container

Podman Quadlets

The following settings make Nvidia GPUs available inside Podman Quadlets:

@Iksas
Iksas / benchmark.cpp
Created August 31, 2025 22:22
C++ benchmark template
#include <iostream>
#include <chrono>
using namespace std;
int main()
{
chrono::steady_clock::time_point begin = chrono::steady_clock::now();
@Iksas
Iksas / offscreen-fix.md
Last active June 7, 2025 09:52
Recover off-screen windows

Recover off-screen windows

Sometimes, in Windows 10/11, an application's window can get "stuck" off-screen, and cannot be moved.

The following steps can be used to move the window back to the screen:

  • Activate the window in the task bar
  • Press Alt + Space to open the window's menu
  • Press M
  • Press Enter
@Iksas
Iksas / pdf_index.md
Last active November 7, 2024 14:27
Full-text search for PDFs

Fast PDF full-text search

The following setup can search the contents of 7000 .pdf files in 0.08 seconds on an i7-1260P (less than 12 microseconds per PDF).

To do so, each .pdf file is first converted to a .txt file, which is stored next to the .pdf. If necessary, OCR is performed. This process takes hours.

As soon as all .txt files are created, they can be quickly searched with ripgrep.

The solution is a bit hacky, but it's what I use at the moment. I'll probably benchmark it against ripgrep-all in the future, and maybe switch to that.

@Iksas
Iksas / wg-multi-tunnel.md
Last active October 30, 2025 08:36
Auto-connecting multiple Wireguard tunnels in Windows

Wireguard multi-tunnel auto-connect in Windows

Set up multiple simultaneous Wireguard tunnels that auto-connect on boot in Windows.

Install the Wireguard tunnels

Install the Windows version of Wireguard and import the two tunnel .conf files.

Set required registry key

@Iksas
Iksas / systemd_sandboxing.md
Created August 8, 2024 20:11
systemd sandboxing

Fixing systemd sandboxing errors

Crash with status=31/SYS

user@ansible-test:~ $ journalctl -u mongod.service | tail
[...]
Aug 08 17:29:42 ansible-test systemd[1]: Started mongod.service - MongoDB Database Server.
Aug 08 17:29:43 ansible-test systemd[1]: mongod.service: Main process exited, code=killed, status=31/SYS
Aug 08 17:29:43 ansible-test systemd[1]: mongod.service: Failed with result 'signal'.
@Iksas
Iksas / wg-quick-fix.md
Last active July 14, 2025 22:24
wg-quick fix on macOS

Fixing wg-quick on macOS

On some macOS setups, wg-quick up does not work correctly if the Wireguard configuration includes a DNS server address.

When this error occurs, wg-quick up exits with the following lines, and the Wireguard tunnel will not work:

$ sudo wg-quick up wg0
...
[#] rm -f /var/run/wireguard/utun3.sock
[#] rm -f /var/run/wireguard/wg0.name
@Iksas
Iksas / git.md
Last active November 16, 2025 12:37
git cheat sheet

Git cheat sheet

Editing

  • Remove last commit

    git reset HEAD^

  • Remove the last commit, and move its changes to the staging area

@Iksas
Iksas / firefox-profile.md
Last active June 8, 2023 15:23
Firefox user.js

My Firefox user.js

Type about:profiles into the URL bar to display the profile folder path.

Copy the user.js file to the default profile's root folder.

After restarting Firefox, about:config can be used to check if the settings have been applied correctly.