Skip to content

Instantly share code, notes, and snippets.

View jkbbwr's full-sized avatar
💭
???

Jakob Bowyer jkbbwr

💭
???
View GitHub Profile
@ilmoeuro
ilmoeuro / ircbot.awk
Last active May 13, 2022 23:43
AWK ircbot, usage: `ncat -c 'awk -v nick=nick -v serv=serv -v chan=chan -f ircbot.awk' <host> <port>`
function message(str) {
system("sleep 0.1");
printf("%s\r\n", str);
printf(">>> %s\n", str) > "/dev/stderr";
system("sleep 0.1");
}
{
printf("<<< %s", $0) > "/dev/stderr";
if (! initialized) {
/*
robin verton, dec 2015
implementation of the RC4 algo
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define N 256 // 2^8
[org 100h]
; uses fixed point: 1 bit sign, 4 bits int, 11 bits frac
xstart equ -3584 ; -1.75
xend equ 1536 ; 0.75
ystart equ -2048 ; -1.0
yend equ 2048 ; 1.0
xincr equ 16 ; (xend-xstart) div 320
yincr equ 20 ; 20.48 = (yend-ystart) div 200
@habnabit
habnabit / chatserver.py
Created September 29, 2012 20:10
one expression chatserver
main = lambda port: (lambda dt: (lambda mm: (lambda n: (map(lambda r: (lambda
rr: setattr(n, *rr) if (type(rr) is tuple and len(rr) == 2) else None)(r()),
[lambda: map(setattr, *zip(*[(n, m, __import__(m)) for m in mm.m.decode('ba'
'se64').split()])), lambda: map(n.s['signal.signal'], (n.s['signal.SIGINT'],
n.s['signal.SIGTERM']), [lambda s, f: (n.s['sys.exit']() if n.f else [n.sa(
mm.l[0], n.o)] and n.u('f', True) or n.fc(n.l))] * 2), lambda: setattr(mm,
'l', mm.l.decode('base64').split('~~~')), lambda: ('sw', n.s['types.Functio'
'nType'] (compile("try:\n\tv = n.select.select(n.so, n.w(), [])\nexcept n.s"
"elect.error, e:\n\tif e[0] != n.errno.EINTR: raise\nelse:\n\tn.u('sr', v)",
'', 'exec'), dict(n=n, OSError=OSError))),lambda: ('l', n.s['socket.socket']
@sontek
sontek / snowjob.sh
Last active April 5, 2024 06:51
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear