Skip to content

Instantly share code, notes, and snippets.


Arti Zirk artizirk

View GitHub Profile
artizirk /
Last active Jan 20, 2021
Apple macOS Catalina under Linux KVM with GVT-g Intel GPU passthrough notes
artizirk /
Last active Jan 18, 2021
OpenPGP SSH access with Yubikey and GnuPG

OpenPGP SSH access with Yubikey and GnuPG

Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.

Yubikey Config under Ubuntu

To reset and disable not used modes on Yubikey you need the ykman program

You can install it using those commands

artizirk /
Created Apr 23, 2019
This script is useful for setting fallback mtime for isync/mbsync CopyArrivalDate option
#!/usr/bin/env python3
# This script is useful for setting fallback mtime for isync/mbsync CopyArrivalDate option
# If you use notmuch then you could do something like this to fix mtime on new mail
# notmuch search --output=files tag:new | xargs -P0 -i ~/code/mailutils/ {}
import email
import sys
import os
from email.utils import parsedate_tz, mktime_tz
artizirk /
Last active Jan 14, 2021
Debug WireGuard Linux kernel module
artizirk /
Last active Dec 30, 2020
arch linux install scripts
echo "Stupid Arch cluster installer"
umount -R /mnt
echo "Partition disk"
artizirk / readme.txt
Created Apr 10, 2015
Huawei E3372h-153
View readme.txt
Working Huawei E3372h-153 SETPORT mappings
replacing A1,A2 with FF turns off need for usb_modeswitch
artizirk / index.html
Last active Dec 14, 2020
Python asyncio websockets http static file server, aka http and websocket server on the same port: aaugustin/websockets#116
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>WebSocket demo</title>
var ws = new WebSocket("ws://"),
messages = document.createElement('ul');
artizirk / semihost.c
Created Dec 7, 2020
openocd: arm semihosting enable; reset run
View semihost.c
void __attribute__ ((noinline)) print_semihosting(const void *buf, uint32_t size)
uint32_t args[3];
args[0] = 1;
args[1] = (uint32_t)buf;
args[2] = size;
asm( "mov r0, #5\n"
"mov r1, %0\n"
"bkpt 0x00AB" : : "r"(args) : "r0", "r1", "memory");
def _slow_crc(data, seed=0xFFFF_FFFF, polynomial=0x04C11DB7):
STM32 CRC that is actually CRC-32/MPEG2 but input data is read as litle-endian (not big-endian like MPEG)
crc = seed
# Pad data if needed
pad_len = len(data) % 4
if pad_len > 0:
words = array.array('I', data[:-pad_len])
artizirk /
Last active Nov 29, 2020
send sms with ppp chat program
#using: sendsms +375555555 "some text i want to send"
#reg to the network (maybe not needed)
gcom reg -d $MODEM
You can’t perform that action at this time.