Skip to content

Instantly share code, notes, and snippets.

View FiXato's full-sized avatar

Filip H.F. "FiXato" Slagter FiXato

View GitHub Profile
@FiXato
FiXato / Mastodon-indicate_undescribed_media_with_borders-subtler.user.css
Last active March 7, 2024 18:29
CSS user style to add a red border around media (images, audio, video and animated 'gifv') that lacks a description. Based on code by Paul: https://linernotes.club/@balrogboogie
/* indicate media without a description
initial code by Paul (https://linernotes.club/@balrogboogie), expanded upon by FiXato (https://contact.fixato.org)
related discussions: https://dragonscave.space/@Mayana/106443499687608116.
Feel free to reuse it; it's public domain (https://linernotes.club/@balrogboogie/106681622019395866) */
.media-gallery__item-thumbnail img:not([alt]),
.audio-player__canvas:not([title]),
.video-player video:not([title]),
.media-gallery__gifv video:not([title])
{
border: 1px dashed rgba(255, 0, 0, 0.5);
@FiXato
FiXato / Scripts.rvdata2-exporter.rb
Last active February 16, 2024 13:47 — forked from hirataya/rvdata2_dump.rb
Script to export the scripts inside the Scripts.rvdata2 data file to Data/exported_scripts as plain text Ruby files. If you run this script from inside RPG Maker VX Ace, I would suggest creating the Data/exported_scripts folder yourself as RGSS3 doesn't seem to support requiring FileUtils. Based on HIRATA Yasuyuki / 平田 泰行's rvdata2_dump.rb script:
#! /usr/bin/env ruby
# encoding: utf-8
#
# Script to export the scripts inside the Scripts.rvdata2 data file to Data/exported_scripts as plain text Ruby files.
# If you run this script from inside RPG Maker VX Ace, I would suggest creating the Data/exported_scripts folder yourself
# as RGSS3 doesn't seem to support requiring FileUtils.
# Based on HIRATA Yasuyuki / 平田 泰行's rvdata2_dump.rb script: https://gist.github.com/hirataya/1853033
begin
require 'fileutils'
rescue LoadError
@FiXato
FiXato / termux-wallpaper-from-geograph.sh
Created September 17, 2019 16:43
Set your Android device's wallpaper through Termux, based on today's Geograph Britain & Ireland image
curl --silent "https://m.geograph.org.uk" | termux-wallpaper -u "https://geograph.org.uk$(curl --silent "https://www.geograph.org.uk/more.php?id=$(grep -oP 'daily.php.+/photo/\K([0-9]{1,})')" | grep original | grep -oP '(/reuse.php[^"]{1,})')"
@FiXato
FiXato / mastodon-pending-follows.py
Last active January 2, 2023 15:19
Get list of mastodon relationships
#!/usr/bin/env python3
# encoding: utf-8
import html
from mastodon import Mastodon
api = Mastodon(
client_id="REPLACE_WITH_APPLICATIONS_CLIENT_ID",
client_secret="REPLACE_WITH_APPLICATIONS_CLIENT_SECRET",
access_token="REPLACE_WITH_APPLICATIONS_ACCESS_TOKEN",
api_base_url="https://your.instance.name.example"
@FiXato
FiXato / mastodon.user.js
Last active November 16, 2022 13:48
TamperMonkey UserScript to tweak the UI of the Toot.Cat Mastodon Glitch-Soc instance
// ==UserScript==
// @name TootCat Mastodon UI tweaks
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Styling tweaks for the Mastodon instance I use.
// @author FiXato
// @match https://toot.cat/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@FiXato
FiXato / create_certs.sh
Created September 13, 2011 21:48
Certificate and Certificate Authority creation tool (for UnrealIRCd)
#!/bin/bash
CERT_DIR=~/certificates
PRIVATE_DIR=$CERT_DIR/private
PUBLIC_DIR=$CERT_DIR/public
PUBLIC_CA=$PUBLIC_DIR/ca.cert.pem
PRIVATE_CA=$PRIVATE_DIR/ca.key.pem
PRIVATE_SERVER_KEY=$PRIVATE_DIR/secure.server.key.pem
PRIVATE_SERVER_KEY_PASSWORDLESS=$PRIVATE_DIR/server.key.pem
PRIVATE_SERVER_CSR=$PRIVATE_DIR/server.req.pem
PUBLIC_SERVER_CERT=$PUBLIC_DIR/server.cert.pem
@FiXato
FiXato / excuse.rb
Last active May 23, 2022 12:12
Your random BOFH excuse calendar.
#!/usr/bin/env ruby
# encoding: utf-8
# Your random BOFH excuse calendar.
# Based upon the The Bastard Operator From Hell Stories written by Simon Paul Travaglia.
# And the list compiled by Jeff Ballard, http://jeffballard.us/
# Get the excuses from http://pages.cs.wisc.edu/~ballard/bofh/excuses
fp = File.expand_path('~/bin/bofh/excuses.txt')
lines = File.readlines(fp)
nr = rand(lines.size)
@FiXato
FiXato / OutlineDemopartyNL-Wuhu-fluid.user.js
Created May 14, 2021 18:16
UserScripts for Outline Demoparty
// ==UserScript==
// @name Outline Demoparty - Voting page
// @namespace https://fixato.org
// @version 0.1
// @description Make the Outline Demoparty voting pages a bit more fluid
// @author FiXato
// @match https://wuhu.outlinedemoparty.nl/*
// @icon https://yt3.ggpht.com/ytc/AAUvwni9hwZW-ca3xpy-72nsG6m4tQ9in4LFNMQgLlXTFQ=s68-c-k-c0x00ffffff-no-rj
// @grant none
// ==/UserScript==
@FiXato
FiXato / listing_manipulation.tcl
Last active May 12, 2021 11:11
An openMSX TCL script to copy the contents of the current LISTing to your clipboard. Just dump this in your profile's openMSX/share/scripts directory and you can use the copy_ascii_listing_to_clipboard command
namespace eval listing_manipulation {
proc strip_memory_addresses {str} {
return [regsub -all -line {^[0-9a-f]x[0-9a-f]{4} > } $str ""]
}
proc copy_ascii_listing_to_clipboard {} {
set_clipboard_text [strip_memory_addresses [listing]]
}
namespace export copy_ascii_listing_to_clipboard
}
namespace import listing_manipulation::*