Skip to content

Instantly share code, notes, and snippets.

View svc64's full-sized avatar
🎯

Asaf svc64

🎯
  • Israel
View GitHub Profile
@svc64
svc64 / decrypt.py
Created March 28, 2025 13:38
Microcorruptions reykjavik decryption
def sb1(x):
return ((x + 0x80) & 0xff) - 0x80
def main():
mem = open("reykjavik.bin", "rb")
data = bytearray(mem.read())
mem.close()
nums_buf_start = 0x247c
secure_str_start = 0x4472
@svc64
svc64 / stuff
Created March 14, 2025 14:41
stuff
15338ea0621d913530a5d9849da4831672ad83ee4e4468c3017ab261cc71eb33
c74dfe5a844329d3f692f42d55ee575a454955804f914d4aa04a1fb966d5d981
@svc64
svc64 / README.md
Created January 5, 2025 17:52 — forked from matthewpi/README.md
Nix on Fedora

NixOS on Fedora

Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.

These steps may not be required if NixOS/nix#2374 is resolved.

SELinux

These commands are required for both Fedora Workstation and Fedora Silverblue

# /usr/lib/systemd/system/docker.service.d/override.conf
# mount your share with "defaults,hard,_netdev"
[Unit]
After=remote-fs.target
Wants=remote-fs.target
@svc64
svc64 / mount_nfs.service
Created February 29, 2024 18:37
nfs mounting lol
[Unit]
Description=Mount NFS share
After=networking.service
Requires=networking.service
[Service]
Type=oneshot
ExecStart=/root/mount_nfs.sh
RemainAfterExit=yes
Timeout=30
[Unit]
Description=Wait for tailscale to be available
After=tailscaled.service
Requires=tailscaled.service
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c 'until /usr/bin/ping -qW 1 -c1 truenas; do sleep 1; done'
RemainAfterExit=yes
Timeout=30
@svc64
svc64 / nmbrnetkvm.md
Created April 8, 2023 09:23 — forked from plembo/nmbrnetkvm.md
NetworkManager bridged network for KVM guests

Setting up a bridged network for KVM guests

This will work with either networkd or NetworkManager as a resolver. In fact, this is the only way to do bridged KVM (libvirtd) networking with NetworkManager.

If you're using NetworkManager (on a desktop or laptop, for example) on your KVM host, follow these instructions to set up a bridge interface.

Once you have the host bridge set up, proceed as follows:

  1. Create a bridge network device inside KVM. Edit and save the below text as file host-bridge.xml:
@svc64
svc64 / addbr0ubunmcli.md
Created April 8, 2023 09:23 — forked from plembo/addbr0ubunmcli.md
Add br0 to Ubuntu desktop using nmcli

Add a bridge interface to Ubuntu desktop using nmcli

Had to do this for some advanced networking with KVM, and couldn't figure out how to do it using the Nework Manager gui. Did find an article later that showed how to do it with nmtui, but it's so much easier to record what you did when using the cli.

To see what everything looks like before starting:

$ nmcli con show
@svc64
svc64 / f36_alienware.md
Created September 9, 2022 09:07
Fedora 36 (KDE) on an Alienware 17 R3
  • Install Fedora 36 and reboot. Make sure to prevent the screen from turning off at this point as that will completely hang the system.

    • Settings -> Power Management -> Energy Saving:

      • Unselect "Dim Screen", "Screen Energy Saving" and "Suspend session"
  • Add i915.disable_power_well=0 to GRUB_CMDLINE_LINUX in /etc/default/grub

  • This will make the laptop display turn off without crashing your system.

@svc64
svc64 / override.conf
Last active June 28, 2022 17:12
Tailscale + Wireguard VPN on the same server
# ip rule
0: from all lookup local
5208: from all lookup main suppress_prefixlength 0
5209: not from all fwmark 0xca6c lookup 51820 # <--- WireGuard's rule
5210: from all fwmark 0x80000 lookup main
5230: from all fwmark 0x80000 lookup default
5250: from all fwmark 0x80000 unreachable
5270: from all lookup 52
32766: from all lookup main
32767: from all lookup default