Skip to content

Instantly share code, notes, and snippets.


Félix Saparelli passcod

View GitHub Profile
View twitter-stats-order.user.css
/* ==UserStyle==
@name reorder stats
@version 1.0.0
@description Moves the new stats button after the regular stuff.
@author passcod
==/UserStyle== */
@-moz-document url-prefix("") {
article [role="group"] > :nth-child(1) {
passcod /
Last active Nov 6, 2022
Xiaomi Mi Scale 2 BLE Advertisement decode (service 0x181D) and ESPHome config
fn main() {
// real data
[0xa2, 0x0c, 0x49, 0xe6, 0x07, 0x0b, 0x06, 0x01, 0x16, 0x00], // start
[0x02, 0x0c, 0x49, 0xe6, 0x07, 0x0b, 0x06, 0x01, 0x20, 0x26], // load
[0x22, 0x0c, 0x49, 0xe6, 0x07, 0x0b, 0x06, 0x01, 0x20, 0x26], // stable
[0xa2, 0x0c, 0x49, 0xe6, 0x07, 0x0b, 0x06, 0x01, 0x20, 0x2a], // idle
passcod / data.json
Created Dec 21, 2021
Rustc error categories
View data.json
View northland.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
passcod /
Last active Oct 6, 2021
HUG language


A function call syntax for KDL.

HUG is several things:

  • A strict KDL superset: all KDL is valid HUG.
passcod / Corefile
Created Jun 23, 2021
Coredns with one local-only zone
View Corefile {
loadbalance round_robin
auto {
directory /local/zones (.*) {1}
passcod /
Last active May 18, 2021
Twitter but alt

Twitter but alt

UserCSS to replace images with their alt text on twitter.

Version 1.0.0


  • A-theme: images with alt text are replaced, images without are left alone
  • B-theme: images with alt text are replaced, images without are removed (blanked)
passcod / microsoft-twitter.userstyle.css
Created Mar 1, 2021
Twitter search page userstyle in the style of MSN, directly based on @daytonabandcamp's mockup
View microsoft-twitter.userstyle.css
/* Credits:
CSS started by @passcod
Finished/improved by YOUR NAME HERE
t r a n s r i g h t s
:root {
--twitter-xp-bg: #f9f9f7;
--twitter-xp-border: #a0a9c6;
passcod /
Last active Dec 29, 2021
Caretaker maintainership in a nutshell

Caretaker Maintainership

(If this file is included in a project, you can find the list of current caretakers at the bottom.)

In a small classical open-source project, maintainers do a lot, and if maintainers don't have time to do a lot, usually the project stalls. Finding new maintainers is hard because few people actively want to take over all the responsibilities of a project. There must be a different way.

With Caretaker Maintainership, "Maintainers" become "Caretakers". Caretakers' only mandatory responsibility is to grant Releasers commit and publish access to the project.

use async_io::Timer;
use async_std::task::{spawn, Context, Poll};
use std::{future::Future, pin::Pin, time::Duration};
/// Awaits a future or spawns it out after a duration of time.
/// If timeout is reached, the future is not dropped, but instead is spawned out as a free task,
/// and `None` is returned.
/// # Examples