Skip to content

Instantly share code, notes, and snippets.

View luqmana's full-sized avatar

Luqman Aden luqmana

View GitHub Profile
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
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
#!/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
// Implemented based on the techniques described in
// the notes by Shai Simonson: 'Public Key Crpytography'
// http://web.stonehill.edu/compsci/Shai_papers/RSA.pdf
// (Page 9-10)
use std::f32;
// Index of Coincidence for English text
// http://www.cs.mtu.edu/~shene/NSF-4/Tutorial/VIG/Vig-IOC.html
// This code can be compiled in 3 modes:
// rustc --cfg find
// rustc --cfg interactive
// rustc --cfg oracle
//
// The interactive mode is based on the
// crib dragging technique described by
// Dan Crowley at:
// https://www.trustwave.com/Resources/SpiderLabs-Blog/The-Way-of-the-Cryptologist/
diff --git a/src/librustc/mir/repr.rs b/src/librustc/mir/repr.rs
index 049063f..38fb55f 100644
--- a/src/librustc/mir/repr.rs
+++ b/src/librustc/mir/repr.rs
@@ -294,7 +294,7 @@ impl<'tcx> Terminator<'tcx> {
}
}
-#[derive(Debug, RustcEncodable, RustcDecodable)]
+#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]