Skip to content

Instantly share code, notes, and snippets.

View aaronjanse's full-sized avatar

Aaron Janse aaronjanse

View GitHub Profile
{
"key": "]",
"command": "cursorMove",
"args": {
"to": "nextBlankLine"
},
"when": "editorTextFocus && dance.mode == 'normal'",
},
{
"key": "shift+]",
@aaronjanse
aaronjanse / cargo.patch
Created September 20, 2021 16:28
rnix-lsp with rnix-parser patched for memory leak bug
diff --git a/Cargo.lock b/Cargo.lock
index 05ad0a9..1b77af8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,5 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
+version = 3
+
[[package]]
{ stdenv, pkgconfig, fetchurl, xwiimote, udev, xorg }:
stdenv.mkDerivation rec {
name = "xf86-input-xwiimote";
src = fetchurl {
url = "https://github.com/dvdhrm/xf86-input-xwiimote/releases/download/${name}-0.5/${name}-0.5.tar.xz";
sha256 = "1gwnbnhybrmhmrp4i2b5yr624mvrr9bpk0r2592y8rm7c5lzqfba";
};
nativeBuildInputs = [ pkgconfig ];
@aaronjanse
aaronjanse / energia.nix
Created November 4, 2020 01:52
Works with nixos-unstable as of October 2020
{ stdenv, autoPatchelfHook, ffmpeg_3, fetchurl, bash, jdk, kmod, pkgs }:
stdenv.mkDerivation {
name = "energia";
version = "1.8.10E23";
src = fetchurl {
url = "http://energia.nu/downloads/downloadv4.php?file=energia-1.8.10E23-linux64.tar.xz";
sha256 = "065vii9x9b7x4bj1b97grz2vwd4xam1lprsbgsfagry3adf3bshv";
};
@aaronjanse
aaronjanse / default.nix
Created July 20, 2020 23:21
Broken `relibc`, compiled using Nix
{ stdenv, buildPackages, fetchurl, lib , makeRustPlatform }:
let
rpath = lib.makeLibraryPath [
buildPackages.stdenv.cc.libc
"$out"
];
bootstrapCrossRust = stdenv.mkDerivation {
name = "binary-redox-rust";
@aaronjanse
aaronjanse / README.md
Created May 18, 2018 23:32
RISC-V 32-bit machine code breakdown
31        26        21        16        11   9     6           0
vv        vv        vv        vv        vv  vv    vv          vv
'F'E'D'C'B'A'9'8'7'6'5'4'3'2'1'0 F E D C B A 9 8 7 6 5 4 3 2 1 0
[ jump target                                  25][ opcode    7]  J-type
[ rd    5][ upper immediate                    19][ opcode    7]  U-type
[ rd    5][ rs1   5][ immhi 5][ immlo     7][fun3][ opcode    7]  I-type
[ immhi 5][ rs1   5][ rs2   5][ immlo     7][fun3][ opcode    7]  B-type
[ rd    5][ rs1   5][ rs2   5][ funct          10][ opcode    7]  R-type
[ rd 5][ rs1 5][ rs2 5][ rs3 5][ funct 5][ opcode 7] R4-type
@aaronjanse
aaronjanse / README.md
Created April 30, 2018 21:09
Resize Arch Linux display

Look for the name in your display (e.g. VGA-1) and possible resolutions (e.g. 1280x768) in

xrandr -q | head

And resize your display like so:

xrandr --display :0 --output NAME_OF_YOUR_DISPLAY --mode WIDTHxHEIGHT
@aaronjanse
aaronjanse / README.md
Created April 30, 2018 17:43
Arch Linux - resize root partition
@aaronjanse
aaronjanse / shamir.go
Last active May 31, 2018 03:30
An easy way to do shamir secret sharing from the command line
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"strings"
sssa "github.com/SSSAAS/sssa-golang"
@aaronjanse
aaronjanse / sshd_config
Created April 13, 2018 22:17
Default Arch Linux /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the