mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
farmhash for worker-id, and prefix fix on firefox
This commit is contained in:
1910
package-lock.json
generated
1910
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,7 @@
|
|||||||
"express-recaptcha": "^3.0.1",
|
"express-recaptcha": "^3.0.1",
|
||||||
"express-session": "^1.15.6",
|
"express-session": "^1.15.6",
|
||||||
"express-sessions": "^1.0.6",
|
"express-sessions": "^1.0.6",
|
||||||
|
"farmhash": "^2.1.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-uglifyjs": "^0.6.2",
|
"gulp-uglifyjs": "^0.6.2",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ path = require('path'),
|
|||||||
//publicPath = path.join(__dirname, 'public'),
|
//publicPath = path.join(__dirname, 'public'),
|
||||||
http = require('http'),
|
http = require('http'),
|
||||||
port = 8080,
|
port = 8080,
|
||||||
|
farmhash = require('farmhash'),
|
||||||
num_processes = require('os').cpus().length;
|
num_processes = require('os').cpus().length;
|
||||||
|
|
||||||
publicPath = path.join(__dirname, 'public');
|
publicPath = path.join(__dirname, 'public');
|
||||||
@@ -46,13 +47,7 @@ function startClustered(redis_enabled) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var worker_index = function(ip, len) {
|
var worker_index = function(ip, len) {
|
||||||
var s = '';
|
return farmhash.fingerprint32(ip) % len;
|
||||||
for (var i = 0, _len = ip.length; i < _len; i++) {
|
|
||||||
if (!isNaN(ip[i])) {
|
|
||||||
s += ip[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Number(s) % len;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var server = net.createServer({ pauseOnConnect: true }, function(connection, a) {
|
var server = net.createServer({ pauseOnConnect: true }, function(connection, a) {
|
||||||
|
|||||||
@@ -1365,10 +1365,15 @@ margin:-1px;
|
|||||||
margin-left: 0px !important;
|
margin-left: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-field .prefix
|
||||||
|
{
|
||||||
|
position: relative !important;
|
||||||
|
}
|
||||||
|
|
||||||
.channel-finder .input-field .prefix{
|
.channel-finder .input-field .prefix{
|
||||||
color:white;
|
color:white;
|
||||||
font-size:17px;
|
font-size:17px;
|
||||||
left: 5px;
|
left: 47px;
|
||||||
top: -9px;
|
top: -9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user