Skip to content

Instantly share code, notes, and snippets.

小太 kotarou3

Block or report user

Report or block kotarou3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kotarou3 / gist:5544626
Created May 9, 2013
Open and completely unfiltered ports for the NSW DET network. These all happen to be POP or IMAP ports for some reason. You can access any address with these ports open, even ones that are meant to be blocked.
View gist:5544626
View mandelbrot.c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/time.h>
#include <netinet/in.h>
View gist:5410841
// 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
View crc32c-fixpoint.c
#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;
View image2datauri.html
<!DOCTYPE html>
<input type="file" id="input" />
<input type="number" id="maxWidth" /> &times; <input type="number" id="maxHeight" />
<button onclick="convert()">Convert</button>
<section><pre id="output"></pre></section>
<section><img id="outputImage"></pre></section>
<script type="application/javascript">
function convert() {
kotarou3 / gist:2517950
Created Apr 28, 2012
Pokemon Showdown Moderation Tool
View gist:2517950
var dingSound = null;
socket.on("update", function(data)
if ( !== "lobby" || !data.logUpdate || data.logUpdate.length === 0 || !data.logUpdate[0].name)
if (data.logUpdate[0].message.toLowerCase().replace(/[^a-z0-9]/, "").indexOf(me.userid) !== -1)
if (dingSound);
dingSound = soundManager.createSound({id:"ding",url: "",autoPlay: true,volume: 100});
View gist:2390188
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;
View remote-shell.c
#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;
kotarou3 / perf.c
Created Sep 1, 2015
Scripted performance counting for side channel attacks
View perf.c
#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>
You can’t perform that action at this time.