This file contains hidden or 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
<html> | |
<head><title>Chat</title></head> | |
<script> | |
window.onload = function() { | |
var chatRoom = new EventSource("/subscribe"); | |
console.log(chatRoom); | |
chatRoom.onmessage = function(event) { | |
var cw = document.getElementById("chat-window"); | |
cw.innerHTML += "<p>" + event.data + "</p><hr />"; | |
console.log(event); |
This file contains hidden or 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/bin/ruby | |
require 'tempfile' | |
CELL_SIZE = 30_000 | |
ASM_STUB_X86_64 =<<EOF | |
.comm bf_cell, #{CELL_SIZE} | |
.global write_byte | |
.global sys_exit | |
.global _start |
This file contains hidden or 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 <stdio.h> | |
/* | |
* if (argc == 1) { | |
* printf("argc equals one\n"); | |
* } else { | |
* printf("argc is not one (%d)\n", argc); | |
* } | |
* return argc; | |
*/ |
This file contains hidden or 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 <stdio.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/ioctl.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <linux/cdrom.h> |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/wait.h> |
This file contains hidden or 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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>What's the time, please?</title> | |
<script type="text/javascript" charset="utf-8"> | |
window.onload = function() { | |
var body_tag = document.getElementsByTagName("body")[0]; | |
var timer_div = document.getElementById("timer"); | |
function getRandomColor() { |
This file contains hidden or 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
/* Totally patented by Ákos Kovács */ | |
#include <stdio.h> | |
void fizzbuzz(int n) | |
{ | |
int i; | |
char fb[][5] = { "Fizz", "Buzz", "%d" }; | |
for (i = 1; i <= n; i++) { | |
*((*fb)+4)=i%15?0x0:0x07; | |
printf(*(fb+(i%5?!!(i%3)*2:!!(i%3))), i); |
This file contains hidden or 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 <stdio.h> | |
#include <unistd.h> | |
int main(int argc, const char *argv[]) | |
{ | |
int i, j; | |
for (i = 0; i <= 100; i++) { | |
fprintf(stderr, "\rLoading ["); | |
for (j = 0; j < 100; j++) { | |
fprintf(stderr, "%c", (i > j) ? '=' : '-'); |
This file contains hidden or 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 <iostream> | |
#include <fstream> | |
#include <cstring> | |
namespace bfck { | |
#define BRAINFUCK_ARRAY_SIZE 30000 | |
void interpretFile(const char *); | |
void eval(int = 0); | |
char bfa[BRAINFUCK_ARRAY_SIZE]; | |
int bptr; |
This file contains hidden or 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
440 500 | |
495 500 | |
550 500 | |
586 500 | |
660 500 | |
733 500 | |
825 500 | |
880 500 |