Skip to content

Instantly share code, notes, and snippets.

View luqmana's full-sized avatar

Luqman Aden luqmana

View GitHub Profile
#!/bin/bash
WORK_DIR=/home/luqman/Develop/webcam-bg
# Cleanup everything on exit
function cleanup_func {
sleep 0.5
echo cleanup
}
trap "exit \$exit_code" INT TERM
<domain type='kvm' id='14' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>win10</name>
<uuid>7b7a4d76-beaf-46be-9ff4-9f025a14755a</uuid>
<title>Windows 10</title>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<vcpu placement='static'>8</vcpu>
<iothreads>1</iothreads>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<domain type='kvm' id='14' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>win10</name>
<uuid>7b7a4d76-beaf-46be-9ff4-9f025a14755a</uuid>
<title>Windows 10</title>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<vcpu placement='static'>8</vcpu>
<iothreads>1</iothreads>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
From e798b6737a803f5b656e5be93bf4aa8d26df54b0 Mon Sep 17 00:00:00 2001
From: Luqman Aden <me@luqman.ca>
Date: Tue, 15 Dec 2020 16:34:07 -0800
Subject: [PATCH] Luqman: Changes to work with newer linux & glibc found on
focal.
---
linux-user/ioctls.h | 21 ++++-
linux-user/syscall.c | 167 +++++++++++++++++++++++++++----------
linux-user/syscall_defs.h | 31 ++++++-
#!/bin/sh
# mkdir qemu-bionic
# cd qemu-bionic
# apt source qemu-kvm/bionic
# cd qemu-2.11*
# patch -p1 < ~/Develop/qemu-stuff/qemu-audio-fix.patch
# patch -p1 < ~/Develop/qemu-stuff/qemu-bionic-on-focal-fixes.patch
# DEBEMAIL="Luqman Aden <me@luqman.ca>" debchange -lluqman
# dpkg-buildpackage -rfakeroot -uc -b
From 5af077d7b25869437d48ba3371f8874c9eeb4667 Mon Sep 17 00:00:00 2001
From: Martin Schrodt <martin@schrodt.org>
Date: Sat, 7 Oct 2017 01:19:01 +0200
Subject: [PATCH 01/30] Remove several layers of latency producing shells
---
audio/paaudio.c | 529 +++++++-------------------------------------------------
1 file changed, 60 insertions(+), 469 deletions(-)
diff --git a/audio/paaudio.c b/audio/paaudio.c
#!/bin/bash
if [ "$1" == "cleanup" ]; then
pactl unload-module module-loopback
pactl unload-module module-null-sink
pactl unload-module module-echo-cancel
exit
fi
# Unload and reload the echo cancel to make sure it is setup properly
@luqmana
luqmana / parker.rs
Last active October 28, 2020 08:00
pub struct Parker {
state: AtomicI8,
event_handle: AtomicU32, // The bottom 2 bits of HANDLE are always 0 if you really wanted to get fancy and stuff state there
// https://devblogs.microsoft.com/oldnewthing/20050121-00/?p=36633
}
impl Parker {
pub fn new() -> Self {
Self {
state: AtomicI8::new(EMPTY),
#!/bin/sh
# Digital Ocean Dynamic DNS Script
#
# Updates an A record using Digital Oceans DNS Managment API
#
# Args:
# $1 - WAN IP