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
// | |
// NAND map | |
// | |
#include <stdio.h> | |
#include <stdlib.h> | |
static char* ToBits(long long x, char bits) { | |
if (bits < 1 || bits > 64) | |
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
import os, sys, re | |
dir = 'files' | |
if len(sys.argv) > 1: | |
dir = sys.argv[1] | |
trackingcode = """\g<1> | |
<a title="Web Analytics" href="http://clicky.com/100759434"><img alt="Web Analytics" src="//static.getclicky.com/media/links/badge.gif" border="0" /></a> | |
<script src="//static.getclicky.com/js" type="text/javascript"></script> | |
<script type="text/javascript">try{ clicky.init(100759434); }catch(e){}</script> | |
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100759434ns.gif" /></p></noscript> |
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 fs = require('fs'); | |
var file = 'EoCApp.CT'; | |
if (process.argv.length > 2) | |
file = process.argv[2]; | |
var f = fs.readFileSync(file, 'utf8'); | |
var i = 0; | |
f = f.replace(/<ID>\d+<\/ID>/gm, function () {return '<ID>' + i++ + '</ID>'}); |
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
import os, sys, re | |
pattern = re.compile("<ID>\d+<\/ID>", re.I | re.M) | |
file = 'EoCApp.CT' | |
if len(sys.argv) > 1: | |
file = sys.argv[1] | |
f = open(file, 'r') | |
s = f.read() |
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
// Bookmarklet: | |
//javascript:(function(){var genCRCTable=function(){var c;var r=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++)c=((c&1)?(0xEDB88320^(c>>>1)):(c>>>1));r[n]=c;}return r;};if(!window.crcTable)window.crcTable=genCRCTable();String.prototype.crc32=function(s){s=s||this.toString();if(s.length<1)return"00000000";var t=window.crcTable||(window.crcTable=genCRCTable());var c=0^(-1);for(var i=0;i<s.length;i++)c=(c>>>8)^t[(c^s.charCodeAt(i))&0xFF];c=((c^(-1))>>>0).toString(16).toUpperCase();return(c.length%2>0)?c+"0":c;};}()); | |
// Usage: | |
//"test".crc32(); | |
var genCRCTable = function () { | |
var c; | |
var r = []; | |
for (var n = 0; n < 256; n++) { |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Mandelbrot with GLSL</title> | |
<style> | |
html, body {margin: 0; padding: 0;} | |
canvas {position: absolute; width: 100%; height: 100%;} | |
</style> | |
</head> |
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
using UnityEngine; | |
using System.Collections; | |
public class CubeMaker : MonoBehaviour { | |
GameObject c, p; | |
public static ReflectionProbe Probe1; | |
// Use this for initialization | |
void Start() { | |
c = GameObject.CreatePrimitive(PrimitiveType.Cube); |
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 exec = require('child_process').exec; | |
child = exec('python cpus.py', | |
function (error, stdout, stderr) { | |
console.log(stdout); | |
}); |
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 fs = require('fs'), | |
https = require('https'); | |
ignore_dirs = ['node_modules', '.git', 'coverage', '.', '..']; | |
ignore_modules = ['assert', | |
'buffer', | |
'child_process', | |
'cluster', | |
'crypto', | |
'dgram', |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Map Selector</title> | |
<style> | |
html, body {margin: 0; padding: 0; width: 1058px;} | |
canvas {border: 1px dashed black;} | |
div, div > div, input[type=text] {float: right; padding: 0px 4px 0px 4px;} | |
div > div {padding: 0px;} |
OlderNewer