Skip to content

Instantly share code, notes, and snippets.

View katrielalex's full-sized avatar

Katriel Cohn-Gordon katrielalex

View GitHub Profile
@katrielalex
katrielalex / # fstar - 2019-05-30_11-01-14.txt
Created May 30, 2019 10:09
fstar on macOS 10.14.4 - Homebrew build logs
Homebrew build logs for fstar on macOS 10.14.4
Build date: 2019-05-30 11:01:14
@katrielalex
katrielalex / colorise
Created February 6, 2018 11:01
Print strings colored by character frequency
#!/usr/bin/env python3
from itertools import accumulate, chain, repeat, tee
import click
import collections
import crayons
import split
COLORS = "red yellow blue white".split()
@katrielalex
katrielalex / Vagrantfile
Last active August 29, 2015 14:19
Vagrantfile to install a Tamarin VM
# Vagrantfile which downloads and compiles the TAMARIN prover from source.
#
# Usage:
# 1. Install a recent version of Vagrant e.g. 1.7.2. (The apt-get packages are extremely old.)
# 2. Download this file somewhere, still called Vagrantfile.
# 3. Run `vagrant up` and wait for a while.
# 4. Open localhost:3001 on your local machine.
#
# If you want to get your hands dirty, you can `vagrant ssh` to connect to the running VM
# as the vagrant user. TAMARIN lives in ~/tamarin-prover and the binary is symlinked into
@katrielalex
katrielalex / keybase.md
Created April 8, 2015 11:06
Hey folks, I use Keybase...

Keybase proof

I hereby claim:

  • I am katrielalex on github.
  • I am katrielalex (https://keybase.io/katrielalex) on keybase.
  • I have a public key whose fingerprint is 0CFA C65C 7BE9 DC34 2DFE 6E42 15DF 9B2F 5DE3 8211

To claim this, I am signing this object:

#!/usr/bin/env python
"""
Quick script to beemind entering at least some meals into MyFitnessPal for the day.
Setup instructions:
- install myfitnesspal, requests and keyring (if you don't have them)
- call keyring.set_password("myfitnesspal", <your_username>, <your_password>)
- call keyring.set_password("beeminder", <your_username>, <your_api_key>)
#!/bin/bash
echo "Provisioning..."
# Get the dependencies
sudo apt-get install -y maude graphviz zlib1g-dev ghc happy alex cabal-install git
# Get Tamarin (only the development branch, without history)
git clone --depth 1 --single-branch --branch develop https://github.com/tamarin-prover/tamarin-prover/
cd tamarin-prover
@katrielalex
katrielalex / pushbullet listener
Created January 28, 2015 18:00
Listen to the Pushbullet websocket stream of events, and hit a key on a particular event.
#!/usr/bin/env python2
import ConfigParser
import time
import json
import os
import requests
import subprocess
import websocket
def toggle_donotdisturb():