Skip to content

Instantly share code, notes, and snippets.

View veremenko-y's full-sized avatar

Yaroslav Veremenko veremenko-y

  • Edmonton AB Canada
View GitHub Profile
@c0m4r
c0m4r / freebsd_ovh_vps.md
Last active November 16, 2025 22:49
FreeBSD installation on OVH VPS

FreeBSD installation on OVH VPS

OVH now offers FreeBSD as a distro choice, however you might still want to install a specific version yourself or choose another root filesystem. In such case - this guide is for you.

This guide explains how to install the FreeBSD on OVH VPS. This might also work for other VPS providers with the proper rescue system in place.

Inspired by https://www.klajnszmit.net/unix-bsd-linux/openbsd-on-ovh-vps

Table of contents:

@mikroskeem
mikroskeem / docker-network-ns.nix
Last active August 14, 2025 17:11
Stay using nftables in combination with Docker, and set up separate network namespace to make it happy.
{ pkgs, ... }:
# Based on https://wiki.archlinux.org/title/Nftables#Working_with_Docker
let
dockerHostName = "dockernet";
hostip = "${pkgs.util-linux}/bin/nsenter --target 1 --net -- ${ip}";
ip = "${pkgs.iproute2}/bin/ip";
dockerNsSetupScript = pkgs.writeShellScript "docker-netns-setup" ''
@tomdaley92
tomdaley92 / README.md
Last active November 27, 2025 14:12
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@halmartin
halmartin / switch_brain_strace.txt
Created June 24, 2020 18:09
strace of switch_brain running on a Meraki MS220-8P (modified firmware)
This file has been truncated, but you can view the full file.
/ # strace -E LD_LIBRARY_PATH=/opt/lib -v -s 1024 /opt/bin/switch_brain
execve("/opt/bin/switch_brain", ["/opt/bin/switch_brain"], ["USER=root", "SHLVL=1", "HOME=/", "TERM=vt100", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", "SHELL=/bin/sh", "PWD=/", "LD_LIBRARY_PATH=/opt/lib"]) = 0
set_thread_area(0x77328ec0) = 0
set_tid_address(0x77321e28) = 404
open("/opt/lib/libmeraki.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_dev=makedev(0x1f, 0x3), st_ino=215, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=1024, st_blocks=2560, st_size=1310343, st_atime=1591549954 /* 2020-06-07T17:12:34+0000 */, st_atime_nsec=0, st_mtime=1591549954 /* 2020-06-07T17:12:34+0000 */, st_mtime_nsec=0, st_ctime=1591549954 /* 2020-06-07T17:12:34+0000 */, st_ctime_nsec=0}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0p]\2\0004\0\0\0\0\0\0\0\7\20\0p4\0 \0\t\0\0\0\0\0\0\0\3\0\0pX\1\0\0X\1\0\0X\1\0\0\30\0\0\0\30\0\0\0\4\0\0\0\10\0\0\0\0\0\0p
@s-aguado
s-aguado / arm-cheatsheet.pdf
Last active April 17, 2025 19:58
ARMv6-M Instruction Set Cheatsheet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MPThLee
MPThLee / enableDiscordExperiments.js
Last active November 26, 2025 08:13
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@AndersonIncorp
AndersonIncorp / install.md
Created June 29, 2018 16:36
Install any linux distro on VPS with low RAM, locked ISO boot

Overview

Scenario

  • Your VPS provider doesn't support ISO mount
  • Your VPS has low RAM and cannot load whole ISO image
  • Your current /boot is to small to contain ISO file

Workaround

  • Boot low memory ISO (CorePure64.iso ~ 14MB)
  • Create new partition ~1GB / size of your ISO
  • dd your ISO into that partition
@mcastelino
mcastelino / qemu_migrate.md
Last active September 25, 2024 03:58
Using Local Virtual Machine Migration to perform fast VM launch using QEMU

Overview

QEMU supports migration of a virtual machine across machine over the network. It also has the capability to save the state of a virtual machine and resume from that state.

It is described in detail in https://www.linux-kvm.org/page/Migration

This capability can be leveraged to create an instant resume virtual machine image if the virtual machine is crafted with care.

Creating a Virtual Machine that can be fast resumed

@jnewc
jnewc / i2c_test.c
Last active September 30, 2024 02:49
i2c analog stick driver
/*
* i2c_test.c
*/
#include <linux/slab.h> /* kzalloc */
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* KERN_INFO */
#include <linux/timer.h> /* timer_list */
#include <linux/workqueue.h> /* schedule_work */