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
euCountries = ["AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "EL", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "GB"] | |
_ = require("underscore") | |
fs = require("fs") | |
file = fs.readFileSync("./transactions.csv", "utf-8") | |
lines = file.split("\n") | |
groupedTransactions = _.groupBy lines, (line)-> | |
vals = line.split(",") |
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 zlib = require('zlib'); | |
var ObjectId, UserGetter, db, mongojs; | |
mongojs = require("../../infrastructure/mongojs"); | |
console.log("hello") | |
db = mongojs.db; | |
ObjectId = mongojs.ObjectId; |
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 db, mongoConnectionString, mongojs, query; | |
mongojs = require("mongojs"); | |
var ObjectId = mongojs.ObjectId | |
var async = require("async") | |
var _ = require("underscore") | |
mongoConnectionString = "mongodb://127.0.0.1/sharelatex-production"; |
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
sort -t"," -n -k4 memory.csv > sorted.csv | |
grep "DocOps" sorted.csv> docops.csv | |
grep "sess" sorted.csv> sess.csv | |
grep "doclines" sorted.csv> doclines.csv | |
grep "tpds" sorted.csv> tpds.csv | |
grep UncompressedHistoryOps sorted.csv> historyops.csv | |
grep "project_last_updated" sorted.csv> lastupdated.csv |
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
UserCreator = require("./app/js/Features/User/UserCreator") | |
ProjectCreationHandler = require("./app/js/Features/Project/ProjectCreationHandler") | |
CollaboratorsHandler = require("./app/js/Features/Collaborators/CollaboratorsHandler") | |
uuid = require('node-uuid') | |
async = require("async") | |
_ = require("underscore") | |
require("./app/js/Features/Email/EmailSender").sendEmail= (opts, cb)-> | |
cb() |
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
{ | |
"host" : "primary-mongodb", | |
"version" : "3.0.3", | |
"process" : "mongod", | |
"pid" : NumberLong(24890), | |
"uptime" : 1671011, | |
"uptimeMillis" : NumberLong(1671011524), | |
"uptimeEstimate" : 1655592, | |
"localTime" : ISODate("2015-07-19T15:55:42.960Z"), | |
"asserts" : { |
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
[henry@dyn207249:~/Desktop/a]$ npm install now -g | |
> node-proxy@0.4.0 install /usr/local/lib/node_modules/now/node_modules/node-proxy | |
> make | |
sh: make: command not found | |
npm ERR! error installing node-proxy@0.4.0 Error: node-proxy@0.4.0 install: `make` | |
npm ERR! error installing node-proxy@0.4.0 `sh "-c" "make"` failed with 127 | |
npm ERR! error installing node-proxy@0.4.0 at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20) | |
npm ERR! error installing node-proxy@0.4.0 at ChildProcess.emit (events.js:67:17) |
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
cachedEvents: {} | |
onlySingleClick: (e, waitBetweenClicks = 500)-> | |
foundTime = cachedEvents[e.target] | |
now = new Date().getTime() | |
difference = now - foundTime | |
cachedEvents[e.target] = now | |
return difference > waitBetweenClicks |
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
fs = require("fs") | |
bib2json = require("./bib2json.js") | |
f = fs.readFileSync("../listb.bib", "utf-8") | |
_ = require("lodash") | |
json = bib2json(f) | |
j = _.map json.entries, (ent)-> | |
return {key:ent.EntryKey, author:ent.Fields.author, journal: ent.Fields.journal, title:ent.Fields.title, year: ent.Fields.year} |
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
request = require("request") | |
module.exports = { | |
getUserDetails: function(user_id, callback){ | |
var url = "http://www.api.com/user/" + user_id | |
request.get(url, function(err, response, body){ | |
callback(err, body) | |
}) | |
} | |
} |
OlderNewer