Skip to content

Instantly share code, notes, and snippets.

View toroidal-code's full-sized avatar

Katherine Whitlock toroidal-code

  • New York
View GitHub Profile
#include <functional>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
struct Runnable {
virtual ~Runnable(){};
virtual int operator()() = 0;
type 'a btree =
| Leaf of 'a
| Branch of ('a btree) * ('a btree)
let rec flatten = function
| Leaf(a) -> [a]
| Branch(r, l) -> flatten r @ flatten l
extern crate sync;
use sync::mutex::{Mutex,Guard};
use std::task;
fn lock<'a>(l0 : &'a Mutex, l1 : &'a Mutex) -> (Guard<'a>, Guard<'a>) {
loop {
't0: for _ in range(0u, 1u) {
let u0 = l0.lock();
let u1 = match l1.try_lock() {
None => {
@toroidal-code
toroidal-code / Hyper.md
Last active September 17, 2024 18:07
Have you a Hyper for Great Good

Have you Hyper for Great Good

So. You have become an Emacs wizard. And you find yourself aching for the simplicity that another modifier key would introduce into your life. Ah, the things you could do with Hyper.

Or maybe, you just want Hyper for another reason.

... Except everywhere you look, everyone's talking about .xmodmaps and xkbcomp, but you're using one of those fancy desktop managers. (Aka, not awesome, dwm, xmonad or something even more hipster) And because of that, you're lost in the sea of confusion that is trying to customize your keyboard mapping.

Gnome, Cinnamon, and KDE all use xkb.