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
open FStar.Char
open FStar.Seq
(* Helper *)
let max a b = if a > b then a else b
(* Definition *)
let leftpad (c:char) (n:nat) (s:seq char) : seq char =
let pad = max (n - length s) 0 in
append (create pad c) s
@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 June 10, 2024 19:30
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 June 2, 2024 13:09
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];