Resources
macOS install itself is quite easy using OSX-KVM scripts
Virtual Intel GPU GVT-g stuff
igpu setup is quite easy by following instructions on Arch Linux wiki
macOS install itself is quite easy using OSX-KVM scripts
igpu setup is quite easy by following instructions on Arch Linux wiki
Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.
To reset and disable not used modes on Yubikey you need the ykman
program
You can install it using those commands
#!/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/fix_maildir_mtime.py {} | |
import email | |
import sys | |
import os | |
from email.utils import parsedate_tz, mktime_tz |
This uses Linux kernel dyamic debug features
https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html
This asumes that debugfs
is mounted under /sys/kernel/debug
echo 'module wireguard +p' | sudo tee /sys/kernel/debug/dynamic_debug/control
#!/usr/bash | |
HOSTNAME="juust" | |
SERVER="http:/10.42.0.1" | |
echo "Stupid Arch cluster installer" | |
umount -R /mnt | |
echo "Partition disk" |
Working Huawei E3372h-153 SETPORT mappings | |
replacing A1,A2 with FF turns off need for usb_modeswitch | |
AT^SETPORT="A1,A2;12,1,16,A1,A2" | |
^GETPORTMODE: TYPE: WCDMA: huawei,PCUI:0,MDM:1,NDIS:2,CDROM:3,SD:4, | |
AT^SETPORT="A1,A2;1,12,16,A1,A2" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>WebSocket demo</title> | |
</head> | |
<body> | |
<script> | |
var ws = new WebSocket("ws://127.0.0.1:8765/"), | |
messages = document.createElement('ul'); |
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]) |
#!/bin/ash | |
#using: sendsms +375555555 "some text i want to send" | |
TELFNUMB=$1 | |
SMSTEXT=$2 | |
MODEM="/dev/ttyUSB1" | |
#reg to the network (maybe not needed) | |
gcom reg -d $MODEM |