Skip to content

Instantly share code, notes, and snippets.

View wolverian's full-sized avatar

Ilmari Vacklin wolverian

View GitHub Profile
@wolverian
wolverian / main.go
Last active October 28, 2021 11:44
exp/event
package main
import (
"context"
"os"
"time"
"golang.org/x/exp/event"
"golang.org/x/exp/event/adapter/logfmt"
)
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
#!/usr/bin/env python
import argparse
from typing import List
import github
def delete_repos(
access_token: str, whitelist: List[str] = [], repo_type="owner", doit=False
@wolverian
wolverian / aws-vault.fish
Created April 11, 2019 13:09
Fish shell completion for aws-vault
complete --command aws-vault \
--arguments 'help add list rotate exec remove login' \
--condition 'not __fish_seen_subcommand_from add list rotate exec remove login' \
--exclusive
complete --command aws-vault \
--condition '__fish_seen_subcommand_from exec' \
--exclusive \
--arguments "(aws-vault list --profiles)"

Keybase proof

I hereby claim:

  • I am wolverian on github.
  • I am iviv (https://keybase.io/iviv) on keybase.
  • I have a public key ASALcto8M5Gy3I7HpTlm1WLMktc43zUQ8zq1kJoylxinjQo

To claim this, I am signing this object:

% find .
.
./build-jvm.clj
./build-lumo.cljs
./index.html
./src
./src/muse
./src/muse/core.cljs
% time java -cp /usr/local/Cellar/clojurescript/1.9.293/libexec/cljs.jar:src clojure.main build-jvm.clj
(: interp (Expr-C Env Store -> Result))
(define (interp expr env store)
(match expr
[(num-c n) (v*s (num-v n) store)]
[(plus-c l r) (match-let* ([(v*s v-l s-l) (interp l env store)]
[(v*s v-r s-r) (interp r env s-l)])
(v*s (num+ v-l v-r) s-r))]
[(mult-c l r) (match-let* ([(v*s v-l s-l) (interp l env store)]
[(v*s v-r s-r) (interp r env s-l)])
(v*s (num* v-l v-r) s-r))]
#lang typed/racket
(define-syntax deftype
(syntax-rules ()
[(_ name [cons-name (field-name : field-type) ...] ...)
(begin
(struct cons-name ([field-name : field-type] ...) #:transparent) ...
(define-type name (U cons-name ...)))]))
(deftype arith-c

Keybase proof

I hereby claim:

  • I am wolverian on github.
  • I am iviv (https://keybase.io/iviv) on keybase.
  • I have a public key whose fingerprint is 2CF2 46CE 4C7C ACB4 9D72 598C E8E8 7DDF 9926 4ACE

To claim this, I am signing this object:

#lang typed/racket
(define-type Tree (U leaf node))
(struct: leaf ([val : Number]))
(struct: node ([left : Tree] [right : Tree]))
(: tree-height (-> Tree Integer))
(define (tree-height t)
(match t
[(leaf v) 1]