- Don't run as root.
- For sessions, set
httpOnly
(andsecure
totrue
if running over SSL) when setting cookies. - Use the Helmet for secure headers: https://github.com/evilpacket/helmet
- Enable
csrf
for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrf - Don't use the deprecated
bodyParser()
and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use thedefer
property andpipe()
the multipart upload stream to the intended destination.
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
0-mail.com | |
0815.ru | |
0clickemail.com | |
0wnd.net | |
0wnd.org | |
10minutemail.com | |
20minutemail.com | |
2prong.com | |
30minutemail.com | |
3d-painting.com |
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/perl | |
use RRDs; | |
use LWP::UserAgent; | |
# define location of rrdtool databases | |
my $rrd = '/var/www/status.example.com/rrd'; | |
# define location of images | |
my $img = '/var/www/status.example.com/images'; | |
# define your nginx stats URL | |
my $URL = "http://127.0.0.1/nginx_status"; |
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
# Balancing over 4 nodes by hashing URI (consistently with md5) | |
# onto 16 shards. | |
upstream x0 { server 192.168.0.2; server 192.168.0.3 backup; } | |
upstream x1 { server 192.168.0.2; server 192.168.0.4 backup; } | |
upstream x2 { server 192.168.0.2; server 192.168.0.5 backup; } | |
upstream x3 { server 192.168.0.2; server 192.168.0.3 backup; } | |
upstream x4 { server 192.168.0.3; server 192.168.0.4 backup; } |
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 timeit(f, N, S) { | |
var start, timeTaken; | |
var stats = {min: 1e50, max: 0, N: 0, sum: 0, sqsum: 0}; | |
var i; | |
for (i = 0; i < S; ++i) { | |
start = Date.now(); | |
f(N); | |
timeTaken = Date.now() - start; |
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
// If you dont need to call original method | |
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, { | |
_updatePosition: function(){ | |
// Do what you want to | |
} | |
})); | |
// If you need to call original method | |
var _updatePosition = $.ui.addresspicker.prototype._updatePosition; | |
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, { |
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( $, prototype ) { | |
$.extend( prototype.options, { | |
spinner: "<em>Loading…</em>" | |
}); | |
var _create = prototype._create; | |
prototype._create = function() { | |
_create.call( this ); | |
var self = this; |