Skip to content

Instantly share code, notes, and snippets.

View BrianHicks's full-sized avatar

Brian Hicks BrianHicks

View GitHub Profile
package rpc
import (
"context"
"log"
"net"
"net/http"
"golang.org/x/sync/errgroup"
package main
import (
"fmt"
"io"
"log"
"os"
"sort"
"sync"
"time"
module Tree exposing (..)
import Html exposing (text)
import Json.Decode exposing (..)
import Json.Decode.Extra exposing (lazy)
type BST
= Branch BST Int BST
| Leaf
module TestBenchmarking exposing (..)
import Benchmark exposing (Benchmark)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Time
arities : Benchmark
arities =
Benchmark.describe "arities"
# install something from homebrew
param "package" {}
task "install-homebrew" {
check = "which brew && echo brew installed || (echo brew not installed && exit 1)"
apply = "/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\""
}
task "install" {
check = "brew list | grep -E '^{{param `package`}}$'"
module Path exposing (..)
import String
type Error
= ParsingFailed -- TODO: parser error
| BadPush
| DescendsBelowRoot
| Wasnt Kind
Sending build context to Docker daemon 2.048kB
Step 1/10 : FROM brianhicks/elm-base:0.18.0
---> cae30fe094f4
Step 2/10 : RUN apt-get update && apt-get install --assume-yes git
---> Using cache
---> f8691c73197e
Step 3/10 : RUN cabal update
---> Using cache
---> f466d7028ba9
Verifying my Blockstack ID is secured with the address 1Gf4sVtqRmLXesrbPXdrxZEBq1iy5XLXhE https://explorer.blockstack.org/address/1Gf4sVtqRmLXesrbPXdrxZEBq1iy5XLXhE

Brian's Ridiculous Customizations For Kinesis Advantage 2

I got a Kinesis Advantage 2 recently! It's great! But the stock layout (see appendix) has some problems:

  • I don't like cmd and ctrl being on the tiny buttons. I have to move my hands too much.
  • I don't like escape being in the function row. Needs to be somewhere easier to reach.
  • There are no media or volume keys bound by default.
  • Let's be honest, I never use home, end, page up, or page down. Almost everywhere I need to do those, I use cmd-left, cmd-right, space, and shift-space or readline shortcuts like c-e and c-a. They're easier to reach for me on most keyboards.
  • I really really really want a hyper key. It's easy to get to on most layouts (since the modifiers are all together) but not here. We also don't have a special switch, so we'll have to modify the software. Easy enough, right? (wrong.)
#!/usr/bin/env osascript -l JavaScript
ObjC.import('stdlib');
function run(argv) {
area = argv.join(" ");
var things = Application("Things3");
if (!things.running()) {
console.log("Things 3 is not running! Go start it and try me again.");