Skip to content

Instantly share code, notes, and snippets.


Christian I. Nilsson NiKiZe

View GitHub Profile
NiKiZe /
Created June 25, 2023 08:03
Upsales widget documentation
NiKiZe /
Created December 29, 2022 14:54
mbimcli restart script
#!/bin/sh -e
#Disable wwan
#echo 1-1 | sudo tee /sys/bus/usb/drivers/usb/unbind
uhubctl -l 1-1 -a 0
rmmod cdc_mbim
rmmod cdc_wdm
rmmod cdc_ncm
NiKiZe /
Created January 16, 2022 22:32
Filter and route on hostname using SNI
# Filter and route on hostname using SNI
# This creates iptables rules and ip rules to filter and route HTTPS traffic based on hostname in SNI field
# Some links on why packets might be droped, see rp_filter below
NiKiZe /
Created September 2, 2021 19:19
Start MC7700 LTE on Raspberry Pi
# Connect a Raspberry Pi to LTE using MC7700 Mini PCI Modem with adapter to USB-C
sudo qmicli -d /dev/cdc-wdm0 -p --wds-stop-network
sudo cat /sys/class/net/wwan0/qmi/raw_ip
sudo ip link set dev wwan0 down
# Enable OS Raw IP Mode setting (not persistent)
sudo su -c "echo Y > /sys/class/net/wwan0/qmi/raw_ip"
sudo qmicli -d /dev/cdc-wdm0 -p --device-open-net="net-raw-ip|net-no-qos-header" --wds-start-network="ip-type=6" --client-no-release-cid
NiKiZe /
Created September 2, 2021 16:51
VB.NET Inheritance default
    public interface IName
        /// <summary>Default property override</summary>
        object this[string key] { get; }

    public class ImplNameCs : IName
NiKiZe / dhcpd.conf
Created August 6, 2021 14:23 — forked from robinsmidsrod/dhcpd.conf
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
View dhcpd.conf
ddns-update-style none;
deny bootp; #default
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN (private network)
subnet netmask {
option subnet-mask;
NiKiZe / dnsmasq.conf
Last active June 20, 2023 22:18
Trying to chainload iPXE with full feature set from a lesser featured one. dnsmasq ProxyDHCP edition
View dnsmasq.conf
# Known working dnsmasq version 2.85 config for iPXE proxydhcp usage
# things to replace:
# * - your subnet
# * eth0 - interface to listen on, or switch to bind-dynamic
# * - your tftp server ip
# * - script to run once inside iPXE
# Debug logging
NiKiZe /
Last active June 30, 2022 21:44
Linux system backup
# from
# -p, --acls and --xattrs store all permissions, ACLs and extended attributes.
# Without both of these, many programs will stop working!
# It is safe to remove the verbose (-v) flag. If you are using a
# slow terminal, this can greatly speed up the backup process.
tar --exclude=/tmp/* --exclude=/var/tmp/* --exclude=/usr/portage/* --acls --xattrs --one-file-system -cpvf - . | xz -zvv -T3 -0 > file.xz
xz | tar --acls --xattrs --numeric-owner -xpf -
View ProMicroEn.ino
#include <SPI.h>
#define sSS 2
#define sCLK 3
#define sDOUT 4
#define sDIN 5
#define sZERO 7
#define sCF 8