Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rtgnx on github.
  • I am rtgnx (https://keybase.io/rtgnx) on keybase.
  • I have a public key whose fingerprint is A301 BA41 642B 7642 2D85 7D7B AEDA 0B12 C01F AFE2

To claim this, I am signing this object:

man bash | sed 's/./&\n/g' | awk -v mx=$COLUMNS -v my=$LINES 'BEGIN{x=y=e=f=1}{if(x==mx||!x){e*=-1};if(y==my||!y){f*=-1};x+=e;y+=f;printf "\033[%s;%sH%s",y,x,$1;for (a=0;a<400000;a++){}}'
@rtgnx
rtgnx / ping-stat
Created November 3, 2020 21:33
Measures latency to a host (Threaded) and plot it with matplotlib
import re
import sys
import click
import logging
import numpy as np
import matplotlib.pyplot as plt
from subprocess import check_output
@rtgnx
rtgnx / config
Created August 18, 2023 12:11
rofi
rofi.color-enabled: true
rofi.color-window: #1E1E1E, #1E1E1E, #1E1E1E
rofi.color-normal: #1E1E1E, #FFFFFF, #1E1E1E, #268BD2, #1E1E1E
rofi.color-active: #1E1E1E, #FFFFFF, #1E1E1E, #268BD2, #1E1E1E
rofi.color-urgent: #1E1E1E, #FFFFFF, #1E1E1E, #FF5555, #1E1E1E
rofi.location: 0
rofi.width: 60
rofi.lines: 10
rofi.line-margin: 6
rofi.line-padding: 12
#!/usr/bin/env python3
import math
def amp_power_required(lreq, spl, hr, d2, dref):
dBW = lreq - spl + (20 * math.log10(d2 / dref)) + hr
return math.pow(10, dBW / 10)
# Speaker sensitivity measured at 1 W at 1 meter distance
spls = [82, 84, 86, 88, 91, 92, 94, 96, 98]