Skip to content

Instantly share code, notes, and snippets.

View henninglive's full-sized avatar

Henning Ottesen henninglive

  • Mo i Rana, Norway
View GitHub Profile
@henninglive
henninglive / playground.rs
Created April 19, 2017 18:41 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::sync::{Arc, Mutex, Condvar};
use std::time::{Duration, Instant};
use std::thread;
//use std::sync::atomic::{AtomicBool, Ordering};
trait Factory<'a> {
type Output: 'a;
fn create(&self) -> Self::Output;
}
@henninglive
henninglive / tmux_local_install.sh
Created March 29, 2017 12:30 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@henninglive
henninglive / playground.rs
Created February 26, 2017 01:05 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::marker::PhantomData;
trait SaveState {}
struct NoSave;
struct Saved;
struct Keyboard<S: SaveState> {
save: PhantomData<S>,
}