Skip to content

Instantly share code, notes, and snippets.

# ./bupstash-testdata | RETENTION_BUCKETS="1H:24 1D:14 1W:8 4W:24 52W:100" ./bupstash-retention > /dev/null
id="0" timestamp="2021/06/01 02:02:17" retained=[]
id="1" timestamp="2021/06/01 04:04:54" retained=[]
id="2" timestamp="2021/06/01 06:03:12" retained=[]
id="3" timestamp="2021/06/01 08:05:52" retained=[]
id="4" timestamp="2021/06/01 10:07:56" retained=[]
id="5" timestamp="2021/06/01 12:06:02" retained=[]
id="6" timestamp="2021/06/01 14:07:50" retained=[]
id="7" timestamp="2021/06/01 16:05:48" retained=[]
id="8" timestamp="2021/06/01 18:06:25" retained=[]
@hwayne
hwayne / friendlist.csv
Last active July 12, 2020 08:20
Friendlist draft two
Name Days Contact Comments
their name on average how often to contact method of contact (signal/fb/etc) misc
required required optional optional
@bakpakin
bakpakin / utf8.janet
Last active January 19, 2022 11:34
Use pegs to parse utf8
###
### utf8.janet
###
### Pure janet utf8 utils. You should probably just use C.
###
(defn utf8-encode
"Convert a sequence of codepoints to a string."
[x]
(def buf @"")
@staab
staab / janet.kak
Created December 3, 2019 15:28
Kakoune filetype for Janet
# http://janet-lang.org
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# require lisp.kak
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*[.](janet) %{
set-option buffer filetype janet
#!/usr/bin/env python2
import BaseHTTPServer
import SocketServer
import base64
import httplib
import mimetypes
import os
import shutil
import ssl
@andrewchambers
andrewchambers / gist:1c473fd1595f4fcedbcfc634ee1decb0
Last active March 19, 2020 00:41
full disk encrypted nixos install
#! /bin/sh
set -e
set -u
set -x
# configure this!
hostname="nixos"
password="abc123"
diskdev=/dev/sda
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active April 21, 2024 12:50
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@preshing
preshing / build_cross_gcc
Last active April 11, 2024 02:14
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
@be5invis
be5invis / ceki-tco.js
Last active January 28, 2016 20:55
CEK interpreter with TCO example
// noprotect
function Lambda(param, body, e){
this.param = param
this.body = body
this.env = e
};
Lambda.prototype.apply = function(t, args, k0){
var e_ = Object.create(this.env);
for(var j = 0; j < this.param.length; j++){
e_[this.param[j]] = args[j];
@be5invis
be5invis / interpreter.js
Last active July 1, 2019 11:26
A CPS-style S-exp interpreter (with call/cc)
function interpret(form, env, k){
if(form instanceof Array){
switch(form[0]){
case 'lambda': {
var params = form[1];
var body = form[2];
return k(function(k){ return function() {
var e = Object.create(env);
for(var j = 0; j < params.length; j++)
e[params[j]] = arguments[j];