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
socket = io.connect "http://#{document.location.host}" | |
socket.on 'connect', -> | |
$('#loading').text 'Authenticating' | |
$.get '/login_info', (data) -> | |
socket.emit 'login', | |
username: data.username | |
password: data.password | |
socket.on 'disconnect', -> |
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
<img src="http://www.facepunch.com/avatar/15877.png"> | |
<img src="http://www.facepunch.com/avatar/116165.png"> | |
<img src="http://www.facepunch.com/avatar/194495.png"> | |
<img src="http://www.facepunch.com/avatar/112075.png"> | |
<img src="http://www.facepunch.com/avatar/308339.png"> | |
<img src="http://www.facepunch.com/avatar/197527.png"> | |
<img src="http://www.facepunch.com/avatar/72507.png"> | |
<img src="http://www.facepunch.com/avatar/247166.png"> | |
<img src="http://www.facepunch.com/avatar/3855.png"> | |
<img src="http://www.facepunch.com/avatar/439259.png"> |
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
/^(\d+) (.*?) \((.*?)\) (([\d\.]+) ms|\*)(\s!([A-Z])\s|\s)(([\d\.]+) ms|\*)(\s!([A-Z])\s|\s)(([\d\.]+) ms|\*)(\s!([A-Z])| )$/ |
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
Cookie = require('connect').middleware.session.Cookie | |
crypto = require 'crypto' | |
module.exports = (opts) -> (req, res, next) -> | |
cookie = new Cookie | |
sign = (data) -> | |
hmac = crypto.createHmac 'sha1', opts.secret | |
hmac.update data | |
hmac.digest 'hex' | |
decode = -> |
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
### | |
Browser compatibility: | |
* Firefox 4 - Released: 22/3/2011 | |
* Chrome 5 - Released: 25/5/2010 | |
* Internet Explorer 9 - Released: 14/3/2011 | |
* Opera 11.60 - Released: 6/12/2011 | |
* Safari 5.1 - Released: 24/7/2011 | |
Todo: | |
* Add alternate american spelling. |
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
### | |
Some of the code is pretty funky so watch out, I haven't had time to rewrite it. | |
Browser compatibility: | |
* Firefox 4 - Released: 22/3/2011 | |
* Chrome 5 - Released: 25/5/2010 | |
* Internet Explorer 9 - Released: 14/3/2011 | |
* Opera 11.60 - Released: 6/12/2011 | |
* Safari 5.1 - Released: 24/7/2011 |
This file has been truncated, but you can view the full file.
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
INSERT INTO `countries` (`start`, `end`, `code`) VALUES (7602176, 7864319, 'at'), (16777216, 16777471, 'au'), (16777472, 16778239, 'cn'), (16778240, 16779263, 'au'), (16779264, 16781311, 'cn'), (16781312, 16785407, 'jp'), (16785408, 16793599, 'cn'), (16793600, 16809983, 'jp'), (16809984, 16842751, 'th'), (16842752, 16843007, 'cn'), (16843008, 16843263, 'au'), (16843264, 16859135, 'cn'), (16859136, 16875519, 'jp'), (16875520, 16908287, 'th'), (16908288, 16909055, 'cn'), (16909056, 16909311, 'au'), (16909312, 16941055, 'cn'), (16941056, 16973823, 'th'), (16973824, 17039359, 'cn'), (17039360, 17039615, 'au'); | |
INSERT INTO `countries` (`start`, `end`, `code`) VALUES (17039616, 17072127, 'cn'), (17072128, 17104895, 'th'), (17104896, 17170431, 'jp'), (17170432, 17301503, 'in'), (17301504, 17367039, 'cn'), (17367040, 17432575, 'my'), (17432576, 17435135, 'cn'), (17435136, 17435391, 'au'), (17435392, 17465343, 'cn'), (17465344, 17498111, 'th'), (17498112, 17563647, 'kr'), (17563648, 17825791, 'cn'), (17825792, 1808793 |
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
{spawn} = require 'child_process' | |
s = spawn 'convert', ['Capture.png', '-quality', '100', '-font', 'PT-Sans-Bold', '-pointsize', '14', '-draw', "gravity SouthEast fill #aaaaaa text 6.5,8 'amuzor.com/s/123456'", 'example.jpg'] | |
s.stderr.on 'data', (data) -> | |
console.log "err: #{data}" | |
s.stdout.on 'data', (data) -> | |
console.log "out: #{data}" |
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 dns = require('dns'); | |
var net = require('net'); | |
var blacklist = ['72.51.33.80']; | |
function check(host, callback){ | |
function resolved(err, ip){ | |
callback(!err && blacklist.indexOf(ip) !== -1); | |
} |
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 check(host, callback){ | |
var dns = require('dns'); | |
var net = require('net'); | |
var blacklist = ['72.51.33.80']; | |
function resolved(err, ip){ | |
callback(!err && blacklist.indexOf(ip) !== -1); | |
} |