This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
source: http://www.harmonicaclub.com/tabs/The_Flintstones_Theme.htm | |
A harmonica 1st position | |
6b 4b | |
7b 6d 6b 4b | |
6b 5d 5b 5b 5d 6b 4b 4d 5b |
xkb_keymap { | |
xkb_keycodes { include "evdev+aliases(qwerty)" }; | |
xkb_types { include "complete" }; | |
xkb_compatibility { | |
include "complete" | |
}; | |
xkb_symbols { | |
include "pc+us(colemak)+inet(evdev)" | |
key <RALT> { |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
# For Python unit testing, an idea for how to use a context manager for | |
# a unittest.TestCase instead of the setUp() and tearDown() methods. | |
# | |
# This is a possible answer to-- | |
# | |
# http://stackoverflow.com/questions/8416208/in-python-is-there-a-good-idiom-for-using-context-managers-in-setup-teardown | |
from contextlib import contextmanager | |
import unittest |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This is my xmonad+unity panel config. With this config, you'll have a well integrated panel from unity but still have xmonad as your window manager with your gnome apps, including the pretty gnome-terminal
(for those too lazy to learn xmoobar).
This config doesn't have the unity launcher, mainly becuse it causes windows to be unfloatable, besides I'm not fond of it anymore.
Copy and paste these lines (or understand what it does and do it manually).
//Arash Rouhani | |
#define _GLIBCXX_DEBUG | |
//#define NDEBUG | |
#include <iostream> | |
#include <iomanip> | |
#include <vector> | |
#include <algorithm> | |
#include <sstream> | |
#include <string> | |
#include <math.h> |
/* | |
* Copyright (C) 2014 Square, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
module GetHostName where | |
import Foreign.Marshal.Array ( allocaArray0, peekArray0 ) | |
import Foreign.C.Types ( CInt(..), CSize(..) ) | |
import Foreign.C.String ( CString, peekCString ) | |
import Foreign.C.Error ( throwErrnoIfMinus1_ ) | |
getHostName :: IO String | |
getHostName = do | |
let size = 256 |
I want to use colemak+telex on Ubuntu 14.04. Preferably switching betweeen them with a keyboard shortcut.
canhaz ibus-unikey
sudo cp /usr/share/ibus/component/unikey.xml{,-orig}
curl https://gist.githubusercontent.com/lewtds/14ca841f7331126ad66b/raw/86b525d474e803995dd85833fd8ae41496a5633d/unikey.xml | sudo tee /usr/share/ibus/component/unikey.xml