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
Compiling crafty chess on MacOS, you get the following error: | |
------------------------------------------------------------- | |
~/apps/crafty/crafty-23.4:$ make darwin | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make target=FreeBSD \ | |
CC=gcc CXX=g++ \ | |
CFLAGS='-Wall -pipe -O3' \ | |
CXFLAGS='-Wall -pipe -O3' \ | |
LDFLAGS= \ | |
LIBS='-lstdc++' \ | |
opt='' \ |
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
//From https://code.google.com/p/chromium/issues/detail?id=69227#c37 | |
//take apart data URL | |
var parts = canvas.toDataURL().match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/); | |
//assume base64 encoding | |
var binStr = atob(parts[3]); | |
//convert to binary in ArrayBuffer | |
var buf = new ArrayBuffer(binStr.length); |
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
/********************************* | |
* | |
* Elo Rating Simulation | |
* Copyright (c) 2013, Max Irwin | |
* MIT License | |
* | |
*********************************/ | |
(function(){ | |
var players = []; |
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
startups(0.265) | Previously: https://news.ycombinator.com/item?id=9990221 | |
religion(0.227) | Out of curiosity, why secular humanism vs existential nihilism? I don't think I'll switch sides and time soon, but if I did it would be to nihilism. | |
education(0.245) | Education and Healthcare: Two services which should not be offered by businesses seeking to make a profit. I think future generations will look back and ask: "What were they thinking?" | |
religion(0.203) | Also if the opposite sex thinks you're gay but you're straight, it's harder to attract them. |
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 node | |
var linestream = require('line-stream'); | |
var htmldecode = require('htmldec'); | |
var s = linestream(); | |
var numbers = "zero,one,two,three,four,five,six,seven,eight,nine".split(','); | |
var reletter = /[a-z_]/i; | |
var renumber = /[0-9]/; | |
var reclose = /\<\/[^\>]+\>/g; |
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
Copyright (c) 2011 Max Lovenheim Irwin, http://binarymax.com | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
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
Copyright (c) 2011 Max Lovenheim Irwin, http://binarymax.com | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
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
(function(){ | |
var getColor = function(c) { | |
var temp = document.createElement("div"); | |
var color = {r:0,g:0,b:0,a:0}; | |
temp.style.color = c; | |
temp.style.display = "none"; | |
document.body.appendChild(temp); | |
var style = window.getComputedStyle(temp,null).color; | |
document.body.removeChild(temp); |
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 node | |
var fs = require('fs'); | |
var cm = require('commonmark'); | |
var convert = function(markdown) { | |
var reader = new cm.Parser(); | |
var writer = new cm.HtmlRenderer(); | |
var parsed = reader.parse(markdown); | |
var result = writer.render(parsed); | |
return result; |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Max Irwin http://www.binarymax.com | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |