Skip to content

Instantly share code, notes, and snippets.

@toonn
toonn / Mk I.md
Last active September 25, 2022 17:12
Attempt to package GB Studio

.../gb-studio/default.nix

{ stdenv, fetchFromGitHub, mkYarnPackage }:

mkYarnPackage rec {
  pname = "gb-studio";
  version = "3.0.3";
  rev = "v${version}";

  src = fetchFromGitHub {
@toonn
toonn / awesome-connectivity.md
Last active May 25, 2020 12:42
Awesome tools to connect into your LAN

Awesome Connectivity Tools

Hook up all your computers in a VPN

Tailscale supports mesh routing when possible.

ToxVPN

@toonn
toonn / .envrc
Last active December 10, 2020 22:47
Nix+lorri setup for haskell
eval "$(lorri direnv)"

So you've cloned a repo and made some changes? Now you want to submit a PR. This'll make it look like you didn't forget to fork before making the changes. Zero loss of face and endless enjoyment.

  1. Fork the repo on GitHub.

  2. Rename the local remote.

    git remote rename origin upstream

  3. Add your fork as the new origin.

@toonn
toonn / nylascontainer
Last active March 28, 2017 09:34
Running Nylas sync-engine in a systemd-nspawn Ubuntu container on Arch Linux (based on https://github.com/nylas/sync-engine/wiki/Running-under-systemd-nspawn)
# Install required utilities
pacman -S debootstrap
pacaur -S gnupg1 ubuntu-keyring
# Create a btrfs subvolume to house the container's base system
btrfs subvolume create UbuntuXenial
# Set up the Ubuntu system tree
# According to the man page --arch should be specified on systems without dpkg
debootstrap --arch=amd64 xenial UbuntuXenial/
@toonn
toonn / vertmax.applescript
Last active February 18, 2016 20:50
Mac os X sorely lacks a vertical maximization feature for windows. I bind this applescript to a trigger with quicksilver as a stopgap measure. I'm not sure where I got this from but probably: http://hints.macworld.com/article.php?story=20050428173653581
tell application "Finder"
set {_dx, _dy, _dw, _dh} to bounds of window of desktop
end tell
tell application "System Events" to tell application "Terminal"
tell front window
set {_x, _y, _w, _h} to (get bounds)
set size to {_w - _x, _dh}
set position to {_x, _dy}
end tell