Skip to content

Instantly share code, notes, and snippets.

View mute-mic.ahk
#SingleInstance Force
ShowNotification(title, text)
{
notif_option := 0x24 | 32
TrayTip(text, title, notif_option)
}
SetMuteAll(state, check)
{
@catb0t
catb0t / mypy_json.pyi
Last active Oct 3, 2020
Strict no-Any MyPy JSON type
View mypy_json.pyi
# modified from Original source: https://github.com/python/mypy/issues/731#issuecomment-539905783
from typing import Union, Dict, List
JSONPrimitive = Union[str, int, bool, None]
JSONType = Union[JSONPrimitive, 'JSONList', 'JSONDict']
# work around mypy#731: no recursive structural types yet
class JSONList(List[JSONType]):
pass
View tulsi_paywall_haaretz.md

"For too long, the U.S. has turned a blind eye to the atrocities being committed against civilians in Yemen by the Saudi-U.S. coalition…[a] genocidal war that has killed tens of thousands of Yemeni civilians with bombs and mass starvation, creating the worst humanitarian crisis in the world…The time for crocodile tears and baseless platitudes is over. Enough is enough. The U.S must end its support for Saudi Arabia and stop waging interventionist wars [unauthorized by Congress] that increase destruction, death and suffering around the world…"

You wouldn’t be surprised if this was a speech given by Vladimir Putin or Bashar Assad. But this isn’t a quote from the Kremlin or Damascus. It part of a speech by a member of the U.S. Congress who’s joined the running to be selected as the Democratic Party’s presidential nominee: Tulsi Gabbard.

U.S. politicians criticizing imperialist U.S. foreign policy interventions, this time in the Middle East, and helpfully excluding other major world powers’ own interventions, i

@catb0t
catb0t / wordmap.csv
Created May 30, 2019 — forked from BenTheHokie/wordmap.csv
Phonetically correct word scrambler
View wordmap.csv
I EIGH
J DGE
U OU
S ZE
T TTE
TH CHTH
R EUR
EW IEU
U OU
P PPE
View bug_const_mod.pl
use lib ("\/home\/cat\/perl5\/lib\/perl5");
use Sidef;
binmode( STDIN, ':utf8' );
binmode( STDOUT, ':utf8' );
binmode( STDERR, ':utf8' ) if $^P == 0;
package Sidef::Runtime {
View invert_lightness.js
javascript: (function() {
function RGBtoHSL(RGBColor) {
with(Math) {
var R, G, B;
var cMax, cMin;
var sum, diff;
var Rdelta, Gdelta, Bdelta;
var H, L, S;
R = RGBColor[0];
G = RGBColor[1];
View redshift-later
#!/bin/bash
sleep 10
exec redshift-gtk -t5000K:1900K -b1:.7
View error.md
$ cd build; cmake ..; make 
-- obs-stream-effects: No OBS Studio detected, using downloadable prebuilt binaries.
-- Downloading/updating libobs
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cat/Downloads/obs-stream-effects/build/libobs-download
Scanning dependencies of target libobs-download
[100%] Built target libobs-download
-- Configuring done
@catb0t
catb0t / setuidtest.c
Last active Oct 30, 2018
setuidtest explicit w/syscalls
View setuidtest.c
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
void printid(void) {
uid_t r, e, s;
getresuid(&r, &e, &s);
printf("real: %d eff: %d saved: %d\n", r, e, s);
}
View journalctl pop os nvidia.txt
-- Logs begin at Fri 2018-08-03 21:39:47 UTC, end at Fri 2018-08-03 21:45:00 UTC. --
Aug 03 21:39:47 pop-os kernel: Linux version 4.15.0-23-generic (buildd@lgw01-amd64-055) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 (Ubuntu 4.15.0-23.25-generic 4.15.18)
Aug 03 21:39:47 pop-os kernel: Command line: BOOT_IMAGE=/casper/vmlinuz.efi boot=casper hostname=pop-os username=pop-os noprompt ---
Aug 03 21:39:47 pop-os kernel: KERNEL supported cpus:
Aug 03 21:39:47 pop-os kernel: Intel GenuineIntel
Aug 03 21:39:47 pop-os kernel: AMD AuthenticAMD
Aug 03 21:39:47 pop-os kernel: Centaur CentaurHauls
Aug 03 21:39:47 pop-os kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Aug 03 21:39:47 pop-os kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Aug 03 21:39:47 pop-os kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'