Skip to content

Instantly share code, notes, and snippets.

@passcod
passcod / data.json
Created December 21, 2021 12:46
Rustc error categories
{"E0004":"mir_build","E0005":"mir_build","E0010":"const_eval","E0013":"const_eval","E0015":"const_eval","E0023":"typeck","E0025":"typeck","E0026":"typeck","E0027":"typeck","E0029":"typeck","E0030":"mir_build","E0033":"typeck","E0034":"typeck","E0038":"trait_selection","E0040":"typeck","E0044":"typeck","E0045":"typeck","E0046":"typeck","E0049":"typeck","E0050":"typeck","E0053":"typeck","E0054":"typeck","E0055":"trait_selection","E0057":"typeck","E0059":"typeck","E0060":"typeck","E0061":"typeck","E0062":"typeck","E0063":"typeck","E0067":"typeck","E0069":"typeck","E0070":"typeck","E0071":"typeck","E0072":"trait_selection","E0075":"typeck","E0076":"typeck","E0077":"typeck","E0080":"middle","E0081":"typeck","E0084":"typeck","E0091":"typeck","E0092":"typeck","E0093":"typeck","E0094":"typeck","E0106":"typeck","E0107":"typeck","E0109":"typeck","E0116":"typeck","E0117":"typeck","E0118":"typeck","E0119":"trait_selection","E0120":"typeck","E0121":"typeck","E0124":"typeck","E0128":"resolve","E0130":"ast_passes","E0131":"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@passcod
passcod / hug.md
Last active October 6, 2021 17:11
HUG language

HUG

A function call syntax for KDL.

HUG is several things:

  • A strict KDL superset: all KDL is valid HUG.
@passcod
passcod / Corefile
Created June 23, 2021 14:12
Coredns with one local-only zone
your.zone.tld {
ready
cancel
loop
log
loadbalance round_robin
auto {
directory /local/zones (.*) {1}
}
@passcod
passcod / Description.md
Last active May 18, 2021 01:17
Twitter but alt

Twitter but alt

UserCSS to replace images with their alt text on twitter.

Version 1.0.0

Variants

  • 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
passcod / microsoft-twitter.userstyle.css
Created March 1, 2021 12:39
Twitter search page userstyle in the style of MSN, directly based on @daytonabandcamp's mockup
/* Credits:
Inspo/mockup: https://twitter.com/daytonaBandcamp/status/1365937476133548035
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;
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
/* Public Domain (or CC0) */
a.media-image[title]::after,
a.media-item[title]::after {
content: 'ALT';
position: absolute;
bottom: 0.2em;
background: rgba(0, 0, 0, 0.6);
padding: 0.2em 0.3em;
font-size: 0.7em;
@passcod
passcod / update-vscode.sh
Created June 30, 2020 09:54
Script to update VS Code on Linux
#!/usr/bin/env bash
set -euo pipefail
url="https://update.code.visualstudio.com/latest/linux-x64/insider"
target="$HOME/.local/share/vscode"
xattr="user.vscode.updatename"
mkdir -p "$target"
cd "$target"