Skip to content

Instantly share code, notes, and snippets.

//! Parse ini with deku
//!
//! You need this https://github.com/sharksforarms/deku/pull/387 branch of deku for it to work.
//!
//! See https://twitter.com/passcod/status/1743186223940935754
use deku::prelude::*;
use std::fs::read_to_string;
fn main() {
/* ==UserStyle==
@name tweetdeck.twitter.com - 20/08/2023, 1:05:42 am
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document domain("tweetdeck.twitter.com") {
/* new tweet sidebar, minimised unless hovered */
@passcod
passcod / .gitignore
Last active August 6, 2023 00:24
License stats for crates on crates.io
/metacrate-*
@passcod
passcod / __why-and-how-to-use.md
Last active March 22, 2023 13:33
Bootstrap 4 mixins for spacing utilities without classes

Why?

This:

.action {
  @extend .ml-3;
}
/* ==UserStyle==
@name Twitter.com reorder stats
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Moves the new stats button after the regular stuff.
@author passcod
==/UserStyle== */
@-moz-document url-prefix("twitter.com/home") {
article [role="group"] > :nth-child(1) {
@passcod
passcod / ble.rs
Last active November 6, 2022 11:12
Xiaomi Mi Scale 2 BLE Advertisement decode (service 0x181D) and ESPHome config
fn main() {
vec![
// 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
]
.into_iter()
.map(decode)
@passcod
passcod / Gemfile
Created September 20, 2012 05:15
Padrino + Sidekiq = ♥
# ...
gem 'sidekiq'
# ...
// ==UserScript==
// @name BTD from_list mute filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description mm
// @author You
// @match https://tweetdeck.twitter.com
// @grant none
// ==/UserScript==
@passcod
passcod / CARETAKERS.md
Last active December 29, 2021 17:28
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.

@passcod
passcod / data-markdown.user.js
Created November 9, 2011 00:56 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name *[data-markdown]
// @version 2.0
// @description Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/> and others
// @include *
// ==/UserScript==
// Contribs:
// Thaddee Tyl <http://espadrine.github.com/>