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
<?php | |
// This file throws good practice out of the window | |
include 'setup.php'; | |
// Put these in config file | |
$maxResults = 1000; | |
$intervalLimit = 1000 * 60 * 60; // This should be approximately ((date of last stat) - (date of first stat)) / $maxResults |
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 <nmmintrin.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
int main() { | |
for (uint64_t i = 0; i < 0x100000000ULL; ++i) | |
if (_mm_crc32_u32(0, i) == i) | |
printf("%08x\n", (uint32_t)i); | |
return 0; | |
} |
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
<!DOCTYPE html> | |
<section> | |
<input type="file" id="input" /> | |
<input type="number" id="maxWidth" /> × <input type="number" id="maxHeight" /> | |
<button onclick="convert()">Convert</button> | |
</section> | |
<section><pre id="output"></pre></section> | |
<section><img id="outputImage"></pre></section> | |
<script type="application/javascript"> | |
function convert() { |
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
var dingSound = null; | |
socket.on("update", function(data) | |
{ | |
if (data.room !== "lobby" || !data.logUpdate || data.logUpdate.length === 0 || !data.logUpdate[0].name) | |
return; | |
if (data.logUpdate[0].message.toLowerCase().replace(/[^a-z0-9]/, "").indexOf(me.userid) !== -1) | |
if (dingSound) | |
dingSound.play(); | |
else | |
dingSound = soundManager.createSound({id:"ding",url: "http://soundjax.com/reddo/99652%5EDING1.mp3",autoPlay: true,volume: 100}); |
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
diff '-ruwx.*' '-xconfig*' -xpokedex.js -xlearnsets.js -xformats-data.js '-xnode_modules*' ../trunk/app.js ./app.js | |
--- ../trunk/app.js 2012-04-15 14:50:00.582063198 +1000 | |
+++ ./app.js 2012-04-15 14:38:20.902040986 +1000 | |
@@ -49,7 +49,6 @@ | |
toUserid = toId; | |
BattlePokedex = require('./pokedex.js').BattlePokedex; | |
-BattleTiers = require('./tiers.js').BattleTiers; | |
BattleMovedex = require('./movedex.js').BattleMovedex; | |
BattleStatuses = require('./statuses.js').BattleStatuses; |
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 <sys/socket.h> | |
#include <netinet/in.h> | |
#include <unistd.h> | |
#include <string.h> | |
int main() { | |
int listenfd = socket(AF_INET, SOCK_STREAM, 0); | |
setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &(int){ 1 }, sizeof(int)); | |
struct sockaddr_in servaddr; |
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
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <linux/perf_event.h> | |
#include <sched.h> | |
#include <sys/syscall.h> | |
#include <sys/wait.h> | |
#include <unistd.h> |
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
/** | |
* Room Avatar Commands | |
**/ | |
function fakeUnrecognized() { | |
var fullCmd = this.namespaces.concat(this.cmd).join(' '); | |
if (this.cmdToken === '!') { | |
return this.errorReply("The command '" + this.cmdToken + fullCmd + "' was unrecognized."); | |
} | |
return this.errorReply("The command '" + this.cmdToken + fullCmd + "' was unrecognized. To send a message starting with '" + this.cmdToken + fullCmd + "', type '" + this.cmdToken.repeat(2) + fullCmd + "'."); | |
} |
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 <chrono> | |
#include <map> | |
#include <vector> | |
#include <string> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <unistd.h> | |
#include <sys/wait.h> |
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/bin/env nodejs | |
var x = []; | |
var y = []; | |
var buffer = ""; | |
require("child_process").spawn("evemu-record", {stdio: [process.stdin, "pipe", process.stderr]}).stdout.on("data", function (data) { | |
buffer += data.toString(); | |
if (buffer.indexOf("\n") >= 0) { | |
var lines = buffer.split("\n"); |