most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
# Example Usage: ruby froth.rb ": sq dup * ; 2 sq ." | |
class Froth | |
attr_reader :storage | |
attr_accessor :trace | |
WordDefinition = Struct.new(:name, :xt, :immediate) | |
class WordDefinition | |
def immediate? | |
immediate |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# ... | |
gem 'sidekiq' | |
# ... |
var hash = function(s) { | |
/* Simple hash function. */ | |
var a = 1, c = 0, h, o; | |
if (s) { | |
a = 0; | |
/*jshint plusplus:false bitwise:false*/ | |
for (h = s.length - 1; h >= 0; h--) { | |
o = s.charCodeAt(h); | |
a = (a<<6&268435455) + o + (o<<14); | |
c = a & 266338304; |
#include <stdio.h> | |
#include <uv.h> | |
static void on_close(uv_handle_t* handle); | |
static void on_connect(uv_connect_t* req, int status); | |
static void on_write(uv_write_t* req, int status); | |
static uv_loop_t *loop; | |
static uv_buf_t alloc_cb(uv_handle_t* handle, size_t size) { |
import requests | |
class HoverException(Exception): | |
pass | |
class HoverAPI(object): | |
def __init__(self, username, password): | |
params = {"username": username, "password": password} | |
r = requests.post("https://www.hover.com/api/login", params=params) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000