Skip to content

Instantly share code, notes, and snippets.

View bbatha's full-sized avatar
🏠
Working from home

Ben Batha bbatha

🏠
Working from home
View GitHub Profile
@pythonesque
pythonesque / intrusive.rs
Created September 14, 2015 12:00
Safe (?) interface for intrusive structures
#![cfg_attr(test, feature(rustc_private))]
use std::cell::UnsafeCell;
use std::marker::PhantomData;
use std::ops;
struct InvariantLifetime<'id>(
PhantomData<*mut &'id ()>);
impl<'id> InvariantLifetime<'id> {
#[inline]
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@garyharan
garyharan / dot_pryrc
Created June 18, 2012 14:23
Awesome Print + Pry == Awesome Pry
require "rubygems"
require "awesome_print"
Pry.print = proc { |output, value| output.puts value.ai }