Skip to content

Instantly share code, notes, and snippets.


Ben Orchard raehik

View GitHub Profile
View Tiff.hs
module Binrep.Example.Tiff where
import Binrep
import Binrep qualified as BR
import Binrep.Type.Common ( Endianness(..) )
import Binrep.Type.Int
import GHC.Generics ( Generic )
import Data.Data ( Typeable, Data )
raehik / plfa-nats-bin-dec-recursion.agda
Created May 13, 2021
Beginner recursion problem from PLFA book
View plfa-nats-bin-dec-recursion.agda
module plfa.part1.NaturalsMWE where
data Bin : Set where
⟨⟩ : Bin
_O : Bin Bin
_I : Bin Bin
-- {-# TERMINATING #-}
dec : Bin -> Bin
dec ⟨⟩ = ⟨⟩
# Download the N2 vocab list and format it into an Anki-friendly CSV.
# A small number of formatting changes are made:
# * I prefer using "word" and "reading" fields rather than "kanji" and "kana",
# meaning words without kanji will have the kana in "word" and no "reading".
# This page does the opposite. I swap this round by swapping those fields if
# kanji is empty.

Keybase proof

I hereby claim:

  • I am raehik on github.
  • I am raehik ( on keybase.
  • I have a public key ASBEjCWwJ0PRlP4LljQ9G1xRXaPQFh4HP3NUpGDah81tmAo

To claim this, I am signing this object:

#!/usr/bin/env python3
# Create a 'BGM' track for a given 'main' track and merge them.
import sys
import os
import subprocess
import random
import argparse
#!/usr/bin/env bash
# Reload the rtl8723be driver and restart the Ubuntu network service.
sudo modprobe -r "$driver" && sudo modprobe "$driver"
sudo service network-manager restart
#!/usr/bin/env bash
# Reload the rtl8723be driver.
sudo modprobe -r "$driver" && sudo modprobe "$driver"
raehik / interfaces-example
Created Sep 25, 2013
Example /etc/network/interfaces file (adapted from my own on a (X)Ubuntu machine), created for a friend.
View interfaces-example
# interfaces(5) file used by ifup(8) and ifdown(8)
auto eth0 # BEN: automatically try to connect to eth0 (man ifup + ifdown)
iface eth0 inet static # BEN: eth0 is static
address 192.168.x.x # BEN: your own static IP
netmask # BEN: likely this will be your netmask
network 192.168.x.0 # BEN: network you use with final octet as 0
broadcast 192.168.x.255 # BEN: probably this
gateway # BEN: a.k.a. router
dns-nameservers # BEN: the nameservers you use
# you use at home. Those