Skip to content

Instantly share code, notes, and snippets.

View xerz-one's full-sized avatar
💗
nyanyaaaaa~

Xerz xerz-one

💗
nyanyaaaaa~
View GitHub Profile
@soatok
soatok / matrix.md
Last active July 8, 2024 05:43
Why I Don't Trust Matrix Developers to Produce a Secure Protocol

Update (2024-05-17)

Oh hey, this rant of mine is making the rounds.

After I wrote this, one of the Matrix leads commented on it, which prompted me to look at their code. I have since found, uh, 4 3 different cryptographic issues in Matrix's Olm and Megolm code.

Expect a blog post on Dhole Moments at some point in August.

One of them is extremely bad, and will put a lot of burden on Matrix users to mitigate effectively. False alarm: I was mistaken about this one. I'll include it in the write-up, though.

@rebeccajae
rebeccajae / postmail.md
Last active January 30, 2019 05:12
PostMail Spec?

The PostMail Protocol Thing

PostMail is an HTTP-based email protocol I'm implementing because I'm sick of how stuck in the 90s email servers feel. I use HTTP POST and a little bit of DNS shenanigans to get compatibility and am working on a demo.

The Configuration

Any domain has a DNS record, a TXT record called POSTMAIL if PostMail is supposed to be supported. It should be set to the prefix of the current domain.

For example, example.com is configured to receive PostMail at postmail-sys.example.com. The TXT record should be set to postmail-sys

/*
* To the extent possible under law, the author has dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
*
* See <http://creativecommons.org/publicdomain/zero/1.0/>
*/
package com.unascribed.random;
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@gavinandresen
gavinandresen / UTXO_BitVector.md
Last active December 14, 2023 23:28
Storing the UTXO as a bit-vector

Half-baked thoughts exploring a different way of implementing a fully-validating BCH node.

The idea is to shift the storage of full transaction data to wallets, and explore how little data a fully validating node could store. This isn't a problem today (the UTXO set easily fits in the RAM of an inexpensive server-class machine), but might eventually be at very large transaction volumes.

Initial block download is a problem today (it is annoying to have to wait several hours or days to sync up a new node), and this scheme could make it orders of magnitude faster by shifting the time when full transaction data is broadcast from initial block download to new transaction announcement.

@jcbrinfo
jcbrinfo / ttk-themes.md
Last active June 6, 2021 18:46
How to set the Ttk theme

How to set the theme of a Ttk application on Linux

Ttk applications like git-gui and gitk look ugly by default on Linux because the default Ttk tries to emulate Motif. Here is how to make them less ugly.

  1. Choose a Ttk theme. A partial list is provided by the official wiki of TCL.
  2. If the chosen a theme that is not built-in:
    1. If not already done, create a directory dedicated to Ttk themes. Example: mkdir ~/.local/share/tk-themes
    2. Put the theme’s directory (there should be a pkgIndex.tcl file at its root) in it. For example, if we want the Clearlooks theme, we copy the content of the themes/clearlooks directory of the “Ttk themes” project (see the link above) in ~/.local/share/tk-themes/clearlooks
    3. If not already done, add the line export TCLLIBPATH= (where `` is the path to the directory where you put your Ttk themes) to your ~/.profile file (or whatever the script that e
pub trait Running<B: StateTy>: ProgramTy {
type Output: StateTy;
}
pub type Run<A: ProgramTy, B: StateTy> = <A as Running<B>>::Output;
// [(Left P), (St Nil C R)] => (# P (St Nil F (Cons C R)))
impl<P: ProgramTy, C: Bit, R: List> Running<St<Nil, C, R>> for Left<P>
where P: Running<St<Nil, F, Cons<C, R>>>
@sdleffler
sdleffler / rust-smallfuck-concretes.rs
Last active March 11, 2017 14:54
`type_operators!` concrete definitions for the `tarpit-rs` Rust type-level Smallfuck interpreter.
// `Bit` trait and `T` and `F` types.
pub trait Bit {
fn reify() -> bool;
}
pub struct F;
pub struct T;
@cookiengineer
cookiengineer / apt-pac.sh
Last active September 11, 2023 20:06
APT-PAC - pacman with APT syntax
#!/bin/bash
# Save this file as /usr/bin/apt-pac and chmod +x it.
case "$1" in
autoremove)
pacman -Rns $(pacman -Qdtq);
;;