Skip to content

Instantly share code, notes, and snippets.

@TimRots
TimRots / fix.md
Created February 11, 2024 18:03
fix pulseaudio glitching by disabling Timer-based scheduling

fix pulseaudio glitching by disabling Timer-based scheduling in /etc/pulse/default.pa

--- default.pa.orig	2024-02-11 18:51:15.415275039 +0100
+++ default.pa	2024-02-06 22:10:08.861560607 +0100
@@ -49,7 +49,7 @@

 ### Automatically load driver modules depending on the hardware available
 .ifexists module-udev-detect.so
-load-module module-udev-detect
@TimRots
TimRots / build_net-snmp-5.9.sh
Created December 13, 2020 01:55
compile net-snmp 5.9 with --enable-blumenthal-aes to Enable AES-192/AES-256 (Blumenthal draft)
#!/usr/bin/env bash
## compile net-snmp 5.9 with --enable-blumenthal-aes to Enable AES-192/AES-256 (Blumenthal draft)
## Authentication support: MD5 SHA1 SHA224 SHA256 SHA384 SHA512
## Encryption support: DES AES AES128 AES192 AES192C AES256 AES256C
apt update -y && apt upgrade -y file libperl-dev\
&& wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.9/net-snmp-5.9.tar.gz \
&& tar xzvf net-snmp-5.9.tar.gz \
&& cd net-snmp-5.9 \
@TimRots
TimRots / measure_cs.sh
Created June 28, 2020 18:26
Measure the costs of context switching for the OS and a Go application
#!/usr/bin/env bash
# Tim Rots - June 2020
#
# This benchmark measures the costs of context switching for the OS and a Go application in usec/op.
#
# Usage:
# $ ./measure_cs.sh
# OS: 2.19416 usec/op
# Go: 0.16 usec/op
@TimRots
TimRots / iterm_2x2.scpt
Created March 1, 2020 23:04
iTerm2 2x2 window split
#!/usr/bin/osascript
tell application "iTerm2"
tell current session of current tab of current window
split horizontally with default profile
split vertically with default profile
end tell
tell third session of current tab of current window
split vertically with default profile
end tell
end tell
@TimRots
TimRots / scan-build_exim4922_centos7.sh
Last active February 16, 2020 17:49
Bash script to generate Clang scan-build report for exim-4.92.2 on CentOS 7
#!/usr/bin/env bash
# bash script to generate Clang scan-build report for exim-4.92.2 on CentOS Linux release 7.6.1810 (Core)
# dependencies
sudo yum install libdb-devel.x86_64 pcre2.x86_64 libXt-devel.x86_64 libXaw-devel.x86_64 -y
wget https://ftp.exim.org/pub/exim/exim4/exim-4.92.2.tar.gz
tar xzvf exim-4.92.2.tar.gz && cd exim-4.92.2
sed -e "s,^EXIM_USER.*$,EXIM_USER=exim," Local/Makefile src/EDITME > Local/Makefile && cp exim_monitor/EDITME Local/eximon.conf
sudo groupadd -g 31 exim
#! /usr/bin/env python
## Tim R ## 2014 ##
## Multithreaded acquisition of process memory from $pid - Proof of Compulsiv..eeh concept (:
#################
##
## License:
## It's just some testing code, Use it as breakfast or whatever other purposes you can imagine!
##
#################