Skip to content

Instantly share code, notes, and snippets.

View abcdabcd987's full-sized avatar
😄
( ´ ▽ ` )ノ

Lequn Chen abcdabcd987

😄
( ´ ▽ ` )ノ
View GitHub Profile
// ==UserScript==
// @name PuTao without 4K
// @version 1.0.1
// @namespace https://abcdabcd987.com
// @homepageURL https://gist.github.com/abcdabcd987/9839987cf0b7cc13e2d9e4b030a188b5
// @author Lequn Chen
// @description Remove links to 4K videos in the torrent list.
// @run-at document-idle
// @match *://pt.sjtu.edu.cn/torrents.php*
// ==/UserScript==
diff -ruN orig/kernel/src/allocator/bin.rs new/kernel/src/allocator/bin.rs
--- orig/kernel/src/allocator/bin.rs 2018-08-02 19:23:14.000000000 +0800
+++ new/kernel/src/allocator/bin.rs 2018-08-04 11:18:29.000000000 +0800
@@ -1,5 +1,6 @@
use std::fmt;
-use alloc::heap::{AllocErr, Layout};
+use core::alloc::{AllocErr, Layout};
+use core::ptr::NonNull;
use allocator::util::*;
@abcdabcd987
abcdabcd987 / delay-fs.cc
Last active November 28, 2022 22:57
A filesystem from which reading a file incurs 50ms delay for each byte.
#if 0
set -e
binname=$(mktemp --suffix -delay-fs.bin)
g++ -o "$binname" -Wall -g -O2 "$0" -lfuse3 -lpthread
"$binname" $@
rm "$binname"
exit
#endif
// delay-fs:
// A filesystem from which reading a file incurs 50ms delay for each byte.