Skip to content

Instantly share code, notes, and snippets.

@turanct
turanct / list-functions.scm
Last active August 29, 2015 14:14
List functions in lisp
; The list datatype in scheme is awesome... They are actually nested pairs
; so they can be manipulated using the three functions used with pairs.
;
; - cons: create a pair
; - car: return the left side of a pair
; - cdr: return the right side of a pair
;
; This is a fantastic abstraction layer, that can be used to create all other
; list functions out there. Some examples:
@turanct
turanct / REPLinatweet.php
Created October 7, 2014 06:24
a PHP REPL in a tweet
<?php
while(1){echo"> ";$i=rtrim(stream_get_line(STDIN,512,PHP_EOL),';');try{@eval('print_r('.$i.');');}catch(Exception$e){print_r($e);}echo"\n";}
@turanct
turanct / Fork.php
Created August 27, 2014 17:35
Simple forking for executing tasks
<?php
class CouldNotForkException extends Exception {}
class Fork
{
private $task;
public function __construct(Closure $task)
{
@turanct
turanct / gist:4541603
Last active December 11, 2015 03:58 — forked from anonymous/gist:4541082
/tc 00:00:14:00 00:00:17:11
De Amerikaanse overheid
bedreigde Zweden met ernstige maatregelen.
/tc 00:00:17:16 00:00:20:06
-tenzij file sharing sites, zoals
de Pirate Bay, neergehaald werden.
/tc 00:00:23:13 00:00:28:04
De rechtszaak tegen de oprichters van