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 byRating(a, b) { | |
var x = a[1]; | |
var y = b[1]; | |
return y - x; | |
} | |
app.get('/top', function(req, res){ | |
db.keys('image:*:location', function(err,keys){ | |
if (err) { throw err; } | |
var images = []; |
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
<% for (var i in images) { var thisImage = images[i]; %> | |
<img src="/images/mugshots/<%- thisImage[0] %>" /><br /> | |
Rating: <%- thisImage[1] %><br /><br /> | |
<% } %> |
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 express = require('express'), | |
app = express.createServer(), | |
redis = require('redis-node'), | |
db = redis.createClient(); | |
app.configure(function(){ | |
app.use(app.router); | |
app.use(express.staticProvider(__dirname + '/static')); | |
}); |
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
# Redis Daemon configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
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
// t: current time | |
// b: beginning value | |
// c: change in value | |
// d: duration | |
var elast = function (t, b, c, d) { | |
var s=1.70158;var p=0;var a=c; | |
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; | |
if (a < Math.abs(c)) { a=c; var s=p/4; } | |
else var s = p/(2*Math.PI) * Math.asin (c/a); |
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 el = document.getElementById('messages'); | |
if (!el) return; | |
var fade; | |
var start; | |
var c = 100; | |
var fps = 100; | |
var wait = 1000; | |
var duration = 3000; |
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
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app |
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
GET /phpldapadmin/ 200 3ms | |
GET /phpldapadmin/htdocs/ 200 2ms | |
GET /phpldap/ 200 1ms | |
GET /phpldap/htdocs/ 200 1ms | |
GET /admin/ 200 1ms | |
GET /admin/htdocs/ 200 1ms | |
GET /admin/ldap/ 200 1ms | |
GET /admin/ldap/htdocs/ 200 1ms | |
GET /admin/phpldap/ 200 1ms | |
GET /admin/phpldap/htdocs/ 200 1ms |
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
make[1]: Entering directory `/private/var/root/node-v0.8.1/out' | |
CC(target) /private/var/root/node-v0.8.1/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o | |
In file included from /usr/include/sys/types.h:79, | |
from ../deps/http_parser/http_parser.h:30, | |
from ../deps/http_parser/http_parser.c:24: | |
/usr/include/sys/_types.h:94: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__darwin_blkcnt_t' | |
/usr/include/sys/_types.h:95: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__darwin_blksize_t' | |
/usr/include/sys/_types.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__darwin_dev_t' | |
/usr/include/sys/_types.h:99: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__darwin_gid_t' |
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
make -C out BUILDTYPE=Release | |
make[1]: Entering directory `/private/var/root/node-v0.8.1/out' | |
CC(target) /private/var/root/node-v0.8.1/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o | |
LIBTOOL-STATIC /private/var/root/node-v0.8.1/out/Release/libhttp_parser.a | |
File "./gyp-mac-tool", line 154 | |
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666) | |
^ | |
SyntaxError: invalid syntax | |
make[1]: *** [/private/var/root/node-v0.8.1/out/Release/libhttp_parser.a] Error 1 | |
make[1]: Leaving directory `/private/var/root/node-v0.8.1/out' |