Skip to content

Instantly share code, notes, and snippets.

View wilkie's full-sized avatar
☠️
screaming into the void

wilkie wilkie

☠️
screaming into the void
View GitHub Profile
require 'net/http'
require 'json'
# a simple wrapper to do an HTTP GET
def fetch_uri(uri, limit = 10)
uri = URI(uri)
request = Net::HTTP::Get.new(uri.request_uri)
http = Net::HTTP.new(uri.hostname, uri.port)
if uri.scheme == 'https'
@wilkie
wilkie / abstract.txt
Last active December 12, 2015 06:38 — forked from wolfwood/abstract.txt
XOmB+Djehuty: A Remix OS for Computation Liberation
In the world of software, most developers are building upwards and
losing sight of the cyber-centuries worth of cruft below, which we
call the Operating System: the final arbiter of access, privilege and
resource allocation on all computers. These systems are developed by a
shrinking community that has ceded us a particular approach to
resource management that parallels the power structure present in
their community and society at large. It has been observed
(http://en.wikipedia.org/wiki/Conway's_law) that there is a strong
@wilkie
wilkie / builtins.c
Created May 3, 2012 06:25 — forked from avdi/builtins.c
C builtins
void strcpy(char* dest, char* src) {
src = "aaa";
while(*dest++ = *src++);
}
int main(void) {
char buff[64];
strcpy(buff, "Look ma, ");
strcat(buff, "no #includes");
printf(buff);
@wilkie
wilkie / new.c
Created August 19, 2010 03:31 — forked from duckinator/new.c
#include <stdlib.h>
#include <stdio.h>
#define new(TYPE, ARGS...) ({\
TYPE *item = ( TYPE *)malloc(sizeof( TYPE )); \
item->init = &TYPE##Init; \
item->init(item, ARGS); \
item; \
})
@wilkie
wilkie / base26.c
Created June 17, 2010 03:48 — forked from LindseyB/base26.c
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
char* toBase26(int num) {
char* str;
int length = 1;
int tmp = num;
@wilkie
wilkie / gist:426976
Created June 5, 2010 20:42 — forked from anonymous/gist:426965
Getting a tuple of inherited classes with templates in D.
class A {
int bar;
}
class B : A {
int foo;
}
class C : B {
}
#!/usr/local/bin/perl
# AUTHORS: Dave Wilkinson and Bradley D. Kuhlman
# PURPOSE: Will rename media files consisting of episodes of a
# television series by using the epguides.com website from
# some cryptic, yet commonly found when downloaded on the
# internet, format to be `## - Title` where ## is the episode
# number.