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
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
# and made a lot more robust by me | |
# this implementation uses erb by default. if you want to use any other template mechanism | |
# then replace `erb` on line 13 and line 17 with `haml` or whatever | |
module Sinatra::Partials | |
def partial(template, *args) | |
template_array = template.to_s.split('/') | |
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" | |
options = args.last.is_a?(Hash) ? args.pop : {} | |
options.merge!(:layout => false) |
{- | |
Zachary Weaver <zaw6@pitt.edu> | |
JSONParser.hs | |
Version 0.1.1 | |
A simple example of parsing JSON with Parsec in haskell. Note that | |
since the primary point of this excersize is demonstration, | |
Text.Parsec.Token was avoided to expose more of the grammar. Also, | |
complicated optimizations and shorcuts were avoided (mostly). |
function transpose(a) | |
{ | |
return a[0].map(function (_, c) { return a.map(function (r) { return r[c]; }); }); | |
// or in more modern dialect | |
// return a[0].map((_, c) => a.map(r => r[c])); | |
} |
# RFC 5322 Email Validation Regex in Ruby | |
# This work is released under the BSD 3-Clause License | |
# http://choosealicense.com/licenses/bsd-3-clause/ | |
# Copyleft (ɔ) 2013, Peter R. Marreck | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, | |
# are permitted provided that the following conditions are met: | |
# |
# Demo http://ascii.io/a/3019 | |
# build | |
gdbb () { | |
# build with debug flags | |
go build -gcflags "-N -l" -o out | |
# make sure the build didn't fail | |
if [ $? != 0 ]; then return; fi |
Moved to repository: https://github.com/Mailcloud/swift-serializer
spawn qemu-system-x86_64 -machine accel=kvm -nographic -m 1024 -vga none -net user -net nic,model=virtio -device virtio-scsi-pci,id=scsi -cdrom plan9-gce.iso -boot d | |
c[?7l[2J[0mSeaBIOS (version ArchLinux 1.14.0-1) | |
iPXE (http://ipxe.org) 00:02.0 C000 PCI2.10 PnP PMM+3FF914D0+3FEF14D0 C000 | |
Press Ctrl-B to configure iPXE (PCI 00:02.0)... | |