-
Kinesis Freestyle (Terrible key switches. Mushy and un-lovable)
-
Kinesis Freestyle Edge (Traditional layout with too many keys, mech switches, proably too big to be tented easily/properly)
-
Matias Ergo Pro (Looks pretty great. Have not tried.)
-
ErgoDox Kit (Currently, my everyday keyboard. Can buy pre-assembled on eBay.)
-
ErgoDox EZ (Prolly the best option for most people.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gh="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script will mount /Users in the boot2docker VM using NFS (instead of the | |
# default vboxsf). It's probably not a good idea to run it while there are | |
# Docker containers running in boot2docker. | |
# | |
# Usage: sudo ./boot2docker-use-nfs.sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local name = KEYS[1]; | |
local rate = tonumber(KEYS[2]); | |
local max = tonumber(KEYS[3]); | |
local interval = tonumber(KEYS[4]); | |
local now = tonumber(KEYS[5]); | |
local count = tonumber(redis.call('HGET', name, 'count')); | |
local mtime = tonumber(redis.call('HGET', name, 'mtime')); | |
if not mtime then | |
count = max; | |
mtime = now; |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Author: F. Hatz | |
# based on 'https://github.com/bacl/WAM_API_DOC' | |
# start with MultiRoom.sh search (search for speakers) | |
# or with MultiRoom.sh Speaker-IP UUID OBJECTID [OBJECTID OBJECTID ...] volume | |
# or with MultiRoom.sh Speaker-IP fav1/fav2/fav3/radio1/radio2/radio3 volume | |
# or with MultiRoom.sh Speaker-IP play/pause/stop (song: play/pause radio: stop) | |
# or with MultiRoom.sh Speaker-IP next/previous | |
# or with MultiRoom.sh Speaker-IP mute on/off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property btnTitle : "Mute audio" | |
tell application "System Events" to tell application process "zoom.us" | |
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then | |
do shell script "echo Unmuted" | |
else | |
do shell script "echo Muted" | |
end if | |
end tell |