This file contains hidden or 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
require "mp" | |
local msg = require "mp.msg" | |
local utils = require "mp.utils" | |
-- Currently, I use webp quality=90 | |
-- In the future: Use jxl quality=80 | |
-- It might be nice to adjust the quality on a show-by-show basis | |
-- The format_json consults metatables to distinguish between empty arrays and lists | |
local json_object_metatable = { type = "MAP" } | |
function json_object(obj) |
This file contains hidden or 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
// ==UserScript== | |
// @name Toggle Video Controls (f1) | |
// @version 1 | |
// @include https://archive.org/* | |
// @include https://www.youtube.com/* | |
// @grant none | |
// ==/UserScript== | |
// LICENSE: CC0 1.0 | |
// Comments with support for more video players are encouraged, if you want to help out |
This file contains hidden or 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 | |
from __future__ import annotations | |
import abc | |
import argparse | |
import datetime | |
import enum | |
import re | |
import sys |
This file contains hidden or 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 sys | |
# (a | b) & (~b | c) | |
# [[a, b], [~b, c]] | |
# [[1, 2], [-2, 3]] | |
# (a | b) & (~b | c) & (b) | |
# b is true | |
# (a | T) & (F | c) & (T) | |
# T & (c) & T |
This file contains hidden or 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
# I have this inside my .config/fish/config.fish, but you migh be able to put it in .config/fish/functions ? | |
function show_notif --on-event fish_postexec | |
set -l duration $CMD_DURATION | |
set -l command $argv | |
if [ $duration -gt 10000 ] | |
set -l is_front (osascript -e 'tell application "Terminal" to frontmost') | |
if [ $is_front != "true" ] | |
osascript -e "display notification \"Command `$command` finished running after "(expr $duration / 1000)"s\" with title \"Command finished\"" | |
end | |
end |
This file contains hidden or 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
// ==UserScript== | |
// @name Twitter Pinned Lists | |
// @description Show your pinned lists in your twitter top bar. | |
// @version 1.1 | |
// @grant none | |
// @include https://twitter.com/* | |
// @include https://mobile.twitter.com/* | |
// ==/UserScript== | |
// USAGE: Visit your lists page for a few seconds, and this will learn your pinned lists. |
This file contains hidden or 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
" Vim syntax file | |
" Language: HOVALAAG Assembly | |
" Maintainer: Cassie Jones | |
" Latest Revision: 20 September 2020 | |
" See the game at http://silverspaceship.com/hovalaag/ | |
" Get updates at https://gist.github.com/porglezomp/690bb0f75883dc69350174b576ad643f | |
syntax case ignore | |
syn match vasmOperator "[+->|&^~]" |
This file contains hidden or 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 | |
# See the finished video at https://youtu.be/HWJhm25RPXA | |
import functools | |
import json | |
import random | |
import subprocess | |
import time | |
from pathlib import Path | |
from PIL import Image |
This file contains hidden or 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
// ==UserScript== | |
// @name Twitter Alt-Text to Title-Text | |
// @description Copy the alt attribute of twitter images into the title attribute, so that I can see the alt text on hover. | |
// @version 1 | |
// @grant none | |
// @include https://twitter.com/* | |
// ==/UserScript== | |
const SELECTORS = | |
` .tweet .AdaptiveMedia-photoContainer img |
This file contains hidden or 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
// gcc example.c try_load.c | |
#include "try_load.h" | |
#include <stdio.h> | |
void try_to_load(const uint8_t *address) { | |
uint8_t value; | |
if (try_load_u8(address, &value)) { | |
printf("Successfully load from address %p: %d\n", address, value); | |
} else { |
NewerOlder