Skip to content

Instantly share code, notes, and snippets.

View infinity0's full-sized avatar
🛠️
build bridges to the stars, not battleships and sports cars

Ximin Luo infinity0

🛠️
build bridges to the stars, not battleships and sports cars
View GitHub Profile

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512

I updated Signal on 2020-05-16 and the new version now says "Device no longer registered, This is likely because you registered your phone number with Signal on a different device."

I don't know why this has happened since I still have my US number. However I can't receive SMS to it since I now live in the UK. So I'm forced to change numbers again, sigh.

My old number:

+1 650 334 8706
#!/bin/sh
set -e
export KERNEL=$(uname -r)
export TARGET=/lib/modules/$KERNEL/kernel/drivers/gpu/drm/nouveau/nouveau.ko
case $KERNEL in 4.1[0123].*|4.[123456789].*|3.*|2.*) echo >&2 "requires kernel >= 4.14, have $KERNEL"; exit 1;; esac
( test -d nouveau || git clone "https://github.com/skeggsb/nouveau" )
( cd nouveau && git checkout devel-clk && git reset --hard && git clean -fqdx && \
git diff 1e53ec42 -- drm/nouveau/ > k.patch )
( test -d linux || git clone -o torvalds "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" )
( cd linux && git checkout -B nv-reclock v4.15-rc2 && git reset --hard && git clean -fqdx && \
adapted from https://genius.com/Lowkey-fire-in-the-booth-part-2-lyrics
with corrections to split/join lines based on the actual flow of the rhythm
----
Yeah, Fire in the Booth, much anticipated Part 2
Hold tight suspense, listen -
If they don't let us dream then we won't let them sleep
. . . .
@infinity0
infinity0 / test.ml
Last active October 13, 2021 19:49
OCaml GADTs and avoiding "type constructor would escape its scope" errors
(* GADT list that exposes the type of the head element *)
type _ hlist =
| Nil: 'a hlist
| Cons: ('a * 'b hlist) -> 'a hlist
(* let rec len = function *)
(* let rec len (type a) (l: a hlist): int = match l with *)
(* both of the above result in a "type constructor would escape its scope" error *)
(* correct version: *)
let rec len : type a. a hlist -> int = function
@infinity0
infinity0 / ambient.c
Created August 25, 2017 18:43
Set ambient capabilities
/*
* Test program for the ambient capabilities
*
* You need to install libcap-ng-dev first, then compile using:
* $ gcc -lcap-ng -o ambient ambient.c && sudo setcap cap_setpcap,cap_net_raw,cap_net_admin,cap_sys_nice+eip ambient
*
* To get a shell with additional caps that can be inherited do:
*
* ./ambient /bin/bash
*/
@infinity0
infinity0 / notes.rst
Last active August 10, 2017 18:01
airgapped caff

Airgapped workflow

Basic workflow:

#  online$ CAFFDIR=$PWD caff --download ${keyids}
        echo "NEXT STEP: on your secure offline system, run XXX"
# offline$ CAFFDIR=$PWD GNUPGHOME=${secret_dir} caff --sign
        echo "NEXT STEP: on your online system, run XXX"
#  online$ CAFFDIR=$PWD caff --mail
@infinity0
infinity0 / .gitignore
Last active February 28, 2020 14:59
OCaml lens
*.cm*
/a.out
@infinity0
infinity0 / fuck-gnome.txt
Last active March 15, 2022 04:56
Fuck GNOME
Right about now, Free Software court is in full effect
Judge Whax presiding
In the case of Free Software vs. the GNOME Foundation;
prosecuting attorneys are: Satoshi, YYY, and ZZ-motherfucking-Z
Order, order, order
Satoshi, take the motherfucking stand
Do you swear to tell the truth, the whole truth
and nothing but the truth so help your nerd ass?
@infinity0
infinity0 / frag.rst
Last active May 18, 2016 19:50
Fragmentation protocols

Fragmentation protocol

Parties

the transport
  • the party that controls the physical communication. for example yourrouter, or your IRCS network (the set of servers)
  • note that in an IRC network where one or more links are non-SSL then the whole world is effectively the IRC network
@infinity0
infinity0 / apt.conf
Created January 12, 2016 11:48
Debian testing prefs files
APT::Default-Release "testing";
#Aptitude::Purge-Unused "true";
APT::Architectures { "amd64"; "i386"; };