This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; \ | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdlib.h> | |
#include<stdio.h> | |
#include<string.h> | |
char* toBase26(int num) { | |
char* str; | |
int length = 1; | |
int tmp = num; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
int bar; | |
} | |
class B : A { | |
int foo; | |
} | |
class C : B { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |