Skip to content

Instantly share code, notes, and snippets.

View slyphon's full-sized avatar

Jonathan Simms slyphon

View GitHub Profile
@slyphon
slyphon / Instructions.md
Created April 13, 2018 15:48 — forked from mohakshah/Instructions.md
Builing ZFS on Raspberry Pi 3 running Rasbpian

Introduction

This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.

Steps

  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
@slyphon
slyphon / oi.js
Created April 24, 2016 23:50 — forked from PaulCapestany/oi.js
Dan Kaminsky's DefCon RNG challenge
// TLDR: Oi, Barnes. We'll miss ya. Here's a grimy RNG in your honor.
// node oi.js or paste the below into your favorite browser's JS console.
// DEFCON CHALLENGE: Break this!
function millis() { return Date.now(); }
function flip_coin() { n=0; then = millis()+1; while(millis()<=then) { n=!n; } return n; }
function get_fair_bit() { while(1) { a=flip_coin(); if(a!=flip_coin()) { return(a); } } }
function get_random_byte(){ n=0; bits=8; while(bits--){ n<<=1; n|=get_fair_bit(); } return n; }
report_console = function() { while(1) { console.log(get_random_byte()); }}
#include<iostream>
using namespace std;
int main()
{
bool prime = false;
int n;
int i = 2;
#include <iostream>
using namespace std;
int main()
{
float sum = 0;
int i;
for (i = 0; i < 5; i++)
/etc
/usr/lib
/usr/bin
char
scala
java
cache
solaris
linux (strong no hire if gnu is mentioned)
gif
class A
class A2 extends A
class B
trait M[X]
//
// Upper Type Bound
//
def upperTypeBound[AA <: A](x: AA): A = x
@slyphon
slyphon / Louis-ck-email.md
Created November 4, 2012 10:52 — forked from sippey/Louis-ck-email.md
Louis CK email

Hello. Its louis here. I'm clacking this to you on my phone in my dressing room here at studio 8H, right in 30 rockefeller center, in Manhattan, new york city, new york, america, world, current snapshot of all existence everywhere.

Tonight I'm hosting Saturday Night Live, something I zero ever in my life saw happening to me. And yet here it is completely most probably happening (I mean, ANYTHING could NOT happen. So we'll see).

I've been working here all week with the cast, crew, producers and writers of SNL, and with Lorne Michaels. Such a great and talented group of people.

And here we are in the middle of New York City, which was just slammed by a hurricane, leaving behind so much trouble, so much difficulty and trauma, which everyone here is still dealing with every day.

Last night we shot some pre-tape segments in greenwich Village, which was pitch black dark for blocks and blocks, as it has been for a week now.

@slyphon
slyphon / gist:3708808
Created September 12, 2012 18:19 — forked from anonymous/gist:1406238
yammer scala email
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
require 'thread'
# This seems to crash 1.8.7
10.times { Thread.new { Queue.new.pop } }
Process.waitpid fork { GC.start; puts "In child: #{$$}" }
class Module
# Use this to replace a method in an alias_method_chain
def inject_alias_method_chain(target, method_to_replace, method_to_use)
method_instance_to_replace = instance_method(method_to_replace)
meths = (private_instance_methods | instance_methods).sort.grep(/^#{target}/)
found = meths.detect do |m|
m != method_to_replace.to_s && instance_method(m) == method_instance_to_replace
end
if found
alias_method found, method_to_use