Skip to content

Instantly share code, notes, and snippets.

View keroserene's full-sized avatar

serene keroserene

View GitHub Profile
@keroserene
keroserene / nest.py
Created November 11, 2012 08:06
Reorganize basic list into nested lists, with similar elements per level.
# 2012.11.11 - 02:44:45
# (Python 3.3)
def nest(bird):
"""Recursively nest similar elements at same level."""
if not bird: return []
beak = bird[0] # Current element to match for this level.
egg = []
prev = 0
while beak in bird:
@keroserene
keroserene / game_of_thrones
Last active December 15, 2015 15:49
A clandestine url for rick rolling friend's terminals :)
#!/bin/bash
curl https://raw.github.com/keroserene/rickrollrc/master/roll.sh | bash
@keroserene
keroserene / gist:9103784
Created February 19, 2014 23:27
SCTP multi-datachannel test
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
<title>SCTP multi-datachannels</title>
<style>
body {
background-color: #000; color: #0f0;
text-align: center; margin: auto;
}
@keroserene
keroserene / tsvoid.ts
Created March 26, 2014 20:51
Typescript void generic problem
interface Foo<T> {
bar<T2>(callback:(t:T)=>T2) : T2;
}
var foo :Foo<string>;
// Works as expected.
foo.bar<number>((s:string) => {
return 12345;
});

Keybase proof

I hereby claim:

  • I am keroserene on github.
  • I am keroserene (https://keybase.io/keroserene) on keybase.
  • I have a public key ASAYxLeaQSDnv0XRNwIQEDq4yZaMPINqAIRyBZVjE6WAPgo

To claim this, I am signing this object: