From 8ebbffe4ba372f3e1ec391d910f7a60b333f33b6 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 22 Sep 2016 12:32:25 +0100 Subject: [PATCH 1/2] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 07db7756a9..70ae0cdbd6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,7 +49,7 @@ services: ## Server Pro ## ################ - # SANDBOXED_COMPILES: "true" + # SANDBOXED_COMPILES:true # SHARELATEX_LDAP_HOST: 'ldap://ldap.forumsys.com' # SHARELATEX_LDAP_DN: 'uid=:userKey,dc=example,dc=com' From 4dd905a70ca0720b5fb329e0347332f675e0afb0 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 13 Oct 2016 15:46:18 +0100 Subject: [PATCH 2/2] Create ProjectSize.coffee --- grunt/ProjectSize.coffee | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 grunt/ProjectSize.coffee diff --git a/grunt/ProjectSize.coffee b/grunt/ProjectSize.coffee new file mode 100644 index 0000000000..1c8745a8e0 --- /dev/null +++ b/grunt/ProjectSize.coffee @@ -0,0 +1,24 @@ +require("coffee-script") + +fs = require("fs") +_ = require("underscore") + +if not process.argv[2] + console.log "Usage: coffee project_size.coffee user_files_path" +else + dirPath = process.argv[2] + if not fs.lstatSync(dirPath).isDirectory() + console.log dirPath + " directory not exist" + else + fs.readdir dirPath, (err, files)-> + projects = [] + files.forEach (file)-> + project_id = file.split("_")[0] + if !projects[project_id] + projects[project_id] = 0 + projects[project_id] += fs.lstatSync(dirPath+"/"+file).size + + ids = _.keys projects + console.log "project \t size" + ids.forEach (id)-> + console.log id + "\t" + projects[id]