Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Code 55% faster with GitHub Copilot!
// @description Code 55% faster with GitHub Copilot!
// @version 55.6
// @downloadURL https://gist.github.com/Nemo157/a4df65856b79d50f184974a475c7ce98/raw/Code%252055%2525%2520faster%2520with%2520GitHub%2520Copilot!.user.js
// @updateURL https://gist.github.com/Nemo157/a4df65856b79d50f184974a475c7ce98/raw/Code%252055%2525%2520faster%2520with%2520GitHub%2520Copilot!.user.js
// @match https://github.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
@Nemo157
Nemo157 / tool.rs
Last active August 13, 2023 21:01
//! ```cargo
//! package.edition = "2021"
//! [dependencies]
//! serde-xml-rs = "0.6.0"
//! quick-xml = { version = "0.30.0", features = ["serialize"] }
//! serde = { version = "=1.0.171", features = ["derive"] }
//! clap = { version = "4.3.21", features = ["derive"] }
//! anyhow = "1.0.72"
//! culpa = "1.0.1"
//! ```
/* ==UserStyle==
@name bandcamp.com
@namespace https://gist.github.com/Nemo157/f487aff9fb49c93367c190ec22055307
@version 1.0.0
==/UserStyle== */
@-moz-document domain("bandcamp.com") {
li[data-item-id^="track"] {
opacity: 0.3;
/* ==UserStyle==
@name zulip-archive.rust-lang.org ayu-like
@namespace https://gist.github.com/Nemo157/b30e9687927117836b09773f73e7e1cc
@version 1.0.2
==/UserStyle== */
@-moz-document domain("zulip-archive.rust-lang.org") {
body {
background-color: #0f1419;
}
@Nemo157
Nemo157 / _Publishing crates to IPFS.md
Last active March 26, 2024 20:46
Publishing crates to IPFS

Publishing crates to IPFS

This was an experiment in seeing how feasible it would be to distribute crates on IPFS using the alternative registries feature combined with a local IPFS web gateway.

There was very little plan for this originally, and I wish I had kept more of the intermediate states as I went through multiple major design changes. My original goal was to publish my CLI utility [bs58-cli][] and its dependency tree.

@Nemo157
Nemo157 / .gitignore
Last active November 18, 2019 12:13
hyper on async-std
target/
// MIR for `main::{{closure}}`
// source = MirSource { def_id: DefId(0/1:9 ~ generators[317d]::main[0]::{{closure}}[0]), promoted: None }
// pass_name = generator_resume
// disambiguator = 0
// generator_layout = GeneratorLayout { fields: [LocalDecl { mutability: Not, is_user_variable: Some(Set(Var(VarBindingForm { binding_mode: BindByValue(MutImmutable), opt_ty_info: None, opt_match_place: Some((None, src/test/debuginfo/generators.rs:37:17: 37:18)), pat_span: src/test/debuginfo/generators.rs:37:13: 37:14 }))), internal: false, is_block_tail: None, ty: i32, user_ty: UserTypeProjections { contents: [] }, name: Some(d), source_info: SourceInfo { span: src/test/debuginfo/generators.rs:37:13: 37:14, scope: scope[2] }, visibility_scope: scope[1] }] }
fn main::{{closure}}(_1: std::pin::Pin<&mut [generator@src/test/debuginfo/generators.rs:36:17: 41:6 a:&mut i32 {i32, ()}]>) -> std::ops::GeneratorState<(), ()>{
let mut _0: std::ops::GeneratorState<(), ()>; // return place
scope 1 {
}
trait App<Input>
where
Input: { request: http::Request }
{
type Output: Into<http::Response>;
fn call(self, input: Input) -> Self::Output;
}
struct AuthApp<T> {
[package]
name = "foo"
version = "0.1.0"
authors = ["Wim Looman <wim@nemo157.com>"]
edition = "2018"
[[bin]]
name = "foo"
path = "main.rs"
@Nemo157
Nemo157 / playground.rs
Created October 11, 2018 17:49 — forked from rust-play/playground.rs
`iter` blocks
#![feature(arbitrary_self_types, generators, generator_trait, pin)]
use std::{
marker::Unpin,
ops::{DerefMut, Deref, Generator, GeneratorState},
pin::Pin,
};
trait PinIterator {
type Item;