This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import contextlib as cl, collections as cs, multiprocessing as mp | |
import os, sys, random, time, secrets, pathlib as pl | |
class TestDB: | |
_db, _db_schema = None, [''' | |
create table if not exists data ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, network | |
try: import uasyncio as asyncio | |
except ImportError: import asyncio | |
async def wifi_client(ap_base, ap_map): | |
def ssid_str(ssid): | |
try: return ssid.decode() # mpy 1.20 doesn't support errors= handling | |
except UnicodeError: return repr(ssid)[2:-1] # ascii + backslash-escapes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[monitor-filters] | |
# All filters are applied to channel names and are case-insensitive | |
ignore one specific "bot-commands" channel = starsector.bot-commands | |
skip forum threads in specific guild = glob:starsector.forum.=* | |
who-gives-a-shit-about-wordle (and anything ending in .wordle) = glob:*.wordle | |
actually, ignore threads in forum-like channels anywhere = re:^[^.]+\.(forum|discuss)\.=.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From aed1fdd316d3fad21d051d0264769b2b675d01e3 Mon Sep 17 00:00:00 2001 | |
From: Mike Kazantsev | |
Date: Sat, 5 Sep 2020 20:14:29 +0500 | |
Subject: [PATCH 2/5] Fix using mod-local variable, as it will cause mp desync | |
for later-connecting players | |
--- | |
control.lua | 13 +++++++------ | |
1 file changed, 7 insertions(+), 6 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os, sys, re, time, signal, subprocess as sp | |
tvs = '/opt/vc/bin/tvservice' | |
def get_hdmi_res(): | |
# state 0x120006 [DVI DMT (82) RGB full 16:9], 1920x1080 @ 60.00Hz, progressive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os, sys, glob, re, pathlib as pl | |
src = pl.Path('/etc/systemd/system') | |
dst = pl.Path('/run/systemd/system') | |
for p in map(pl.Path, glob.glob(str(src / '*.slice'))): | |
unit = p.read_text() | |
for line in unit.splitlines(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile & run with: gcc -O1 -o test -lpulse test.c && ./test | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <time.h> | |
#include <error.h> | |
#include <pulse/context.h> | |
#include <pulse/mainloop.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Conflicts=getty@tty%i.service | |
After=systemd-user-sessions.service | |
[Service] | |
User=gui | |
PAMName=login | |
TTYPath=/dev/tty%I | |
TTYReset=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[21:21:42]*** Welcome to the rdircd discord-irc bridge, mk-fg | |
[21:21:42]*** Your host is wyrm, running rdircd 1.89 | |
[21:21:42]*** This server was created at 2019-02-09 16:13:49 UTC | |
[21:21:42]*** wyrm rdircd-1.89 DOQRSZaghilopswz CFILMPQSbcefgijklmnopqrstvz | |
[21:21:42]*** AWAYLEN=200 CASEMAPPING=ascii CHANLIMIT=#:512 CHANTYPES=#~ CHANMODES=eIbq,k,flj,CFLMPQScgimnprstz CHANNELLEN=80 ELIST=C NETWORK=rdircd NICKLEN=64 PREFIX=(ov)@+ are supported by this server | |
[21:21:42]*** SAFELIST STATUSMSG=@+ TOPICLEN=390 USERLEN=32 are supported by this server | |
[21:21:42]*** There are 1 users and 0 invisible on 5 server(s) | |
[21:21:42]*** 0 operator(s) online | |
[21:21:42]*** 191 channels formed | |
[21:21:42]*** I have 1 client(s) and 5 server(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <jpeglib.h> | |
#include "VG/openvg.h" | |
#include "VG/vgu.h" | |
#include "./src/fontinfo.h" | |
#include "./src/libshapes.h" | |
/* |
NewerOlder