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
<?php | |
define('FAILNET_VERSION', '3.0.0 DEV'); | |
define('OUTPUT_SILENT', 0); | |
define('OUTPUT_NORMAL', 1); | |
define('OUTPUT_DEBUG', 2); | |
define('OUTPUT_DEBUG_FULL', 3); | |
define('OUTPUT_RAW', 4); | |
define('OUTPUT_SPAM', 4); // ;D |
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
var express = require('express'), | |
passport = require('passport'), | |
LocalStrategy = require('passport-local').Strategy, | |
connect = require('connect'), | |
http = require('http'), | |
path = require('path'), | |
util = require('util'), | |
fs = require('fs'), | |
redis = require('redis'), | |
cookie = require('cookie'), |
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
why phpbb has failed the open source movement | |
in response to the daydreaming present in http://www.phpbb.com/community/viewtopic.php?f=64&t=2143698 | |
note: this is from the standpoint of the everyday admin, running 3.0.x - changes already patched into 3.1.x are not taken into consideration as they are not readily available for public use. if you want pending changes considered, get off your ass and get a release of 3.1.x out. | |
--- | |
issues | |
- contributing |
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
package bushong; | |
import java.util.ArrayList; | |
public class Board { | |
private ArrayList<String> validSolutions; | |
private Move[][] data; | |
private int moves; | |
public Board() { |
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
# Francis Avila 2009-07-04 | |
# See http://www.evanmiller.org/how-not-to-sort-by-average-rating.html | |
# These functions calculate "Lower bound of Wilson score confidence interval for a Bernoulli parameter" | |
# Two stored functions: | |
# CI_LOWER_BOUND(pos, trials, confidence) calculate a wilson score given POS positive votes in TRIALS number of trials | |
# PNORM(qn) calculate P(qn) (inverse normal distribution); needed by CI_LOWER_BOUND | |
delimiter ;; | |
CREATE DEFINER=`root`@`localhost` FUNCTION `ci_lower_bound`(pos INTEGER, trials INTEGER, confidence DOUBLE) RETURNS double | |
NO SQL |
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
function ss { | |
scrot ~/.ss/$1.png > /dev/null | |
scp ~/.ss/$1.png solanine:~/http/ss/ > /dev/null | |
echo http://odios.us/\~/ss/$1.png | xclip -selection clipboard | |
echo uploaded to http://odios.us/\~/ss/$1.png | |
} |
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
function uriCompressor() | |
for(var i = 0, this.convArray = []; i <= 61; i++) { | |
if(i < 10) { | |
this.convArray.push(i) | |
} else if(i < 36) { | |
this.convArray.push(i.toString(36)) | |
} else { | |
this.convArray.push((i - 26).toString(36).toUpperCase() | |
} | |
} |
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
var EventEmitter = require('events').EventEmitter, | |
util = require('util'), | |
async = require('async') | |
function plugin() { | |
EventEmitter.call(this) | |
} | |
util.inherits(plugin, EventEmitter) | |
// A horribly butchered form of EventEmitter.emit, hacked to support data modification & chaining |
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
var url = require('url'), path = require('path'), fs = require('fs'), port = parseInt(process.argv[2] || 8888, 10) | |
require('http').createServer(function(req, res) { | |
var rfile = path.join(__dirname, 'shareddir', url.parse(req.url).pathname) | |
if(!fs.existsSync(rfile)) { | |
res.writeHead(404, {'Content-Type': 'text/plain'}) | |
res.write("404 Not Found\n") | |
res.end() | |
} else { | |
fs.readFile(rfile + (fs.statSync(rfile).isDirectory()) ? '/index.html' : '', 'binary', function(err, file) { | |
if(err) { |
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
var zlib = require('zlib') | |
zlib.gzip(Buffer('test'), function(err, res) { | |
console.dir(res) | |
var resString = res.toString() | |
var resBuffer = Buffer(resString, 'binary') | |
console.dir(resBuffer) | |
zlib.gunzip(resBuffer, function(err, text) { | |
if(err) throw err | |
console.log(text.toString()) | |
}) |
NewerOlder