Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import re
import sys
import time
import subprocess
import multiprocessing
import termplotlib as tpl
import numpy as np
# place in /etc/pacman.d/hooks
# strips the installed/upgraded kernel and places it in /boot
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = linux
[Action]
@wdevore
wdevore / pulse_fsm.v
Created September 20, 2019 17:51
Verilog Pulse FSM for debouncing. Use a .pcf for tinyFPGA-B2.
// FSM Event based debounce circuit - top.v
//
// The FSM should be reset prior to usage.
// "c" or clock should be around 100Hz = 10ms cycle or 5ms period.
//
// An excerpt from "FSB Based Digital Design Using Verilog" Chp 9.
//
// To see this verilog in action you will need at least 10 LEDs or a 10-bit
// bargraph and 2 switches.
// Your FPGA breakout board will need 12-14 pins available.
use core::cell::RefCell;
use core::fmt::Write;
use cortex_m::interrupt::Mutex;
use heapless::{consts::U1024, spsc::Queue};
use log::{Metadata, Record};
pub static LOGBUF: Mutex<RefCell<Buffer>> = Mutex::new(RefCell::new(Buffer::new()));
pub struct Buffer(pub Queue<u8, U1024>);
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

sudo modprobe 8021q
lsmod | grep 8021q
ip link add link eth1 name eth1.10 type vlan id 10
https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/
@phillipberndt
phillipberndt / Fake xinerama
Last active April 26, 2024 23:59
Fake Xinerama configuration to split the DELL Latitude E7440 two-external monitors into two virtual heads
WHAT THIS IS
------------
The DELL LATITUDE E7440's docking station supports two external displays, and
the notebook's Haswell architecture supports having three displays active at
the same time. It works well, but the two external monitors are merged into one
big display:
$ xrandr
Screen 0: minimum 320 x 200, current 5280 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm