Permalink
Browse files

Uploading etherpad

  • Loading branch information...
1 parent 3dc4503 commit 6ee41d07d87f06aec8f8e8e410f2f5ae5943443c @wshearn committed Mar 23, 2012
Showing with 41,195 additions and 0 deletions.
  1. +5 −0 .openshift/action_hooks/build
  2. +16 −0 .openshift/action_hooks/deploy
  3. +4 −0 .openshift/action_hooks/post_deploy
  4. +5 −0 .openshift/action_hooks/pre_build
  5. +22 −0 .openshift/cron/README.cron
  6. 0 README → .openshift/cron/daily/.gitignore
  7. 0 .openshift/cron/hourly/.gitignore
  8. 0 .openshift/cron/minutely/.gitignore
  9. 0 .openshift/cron/monthly/.gitignore
  10. +16 −0 .openshift/cron/weekly/README
  11. +1 −0 .openshift/cron/weekly/chrono.dat
  12. +3 −0 .openshift/cron/weekly/chronograph
  13. +12 −0 .openshift/cron/weekly/jobs.allow
  14. +7 −0 .openshift/cron/weekly/jobs.deny
  15. +7 −0 .openshift/markers/README
  16. +162 −0 .openshift/mongodb_db.js
  17. +4 −0 CHANGELOG.md
  18. +126 −0 README.md
  19. +1 −0 change
  20. +27 −0 deplist.txt
  21. +62 −0 doc/database.md
  22. +2 −0 doc/easysync/README.md
  23. BIN doc/easysync/easysync-full-description.pdf
  24. +372 −0 doc/easysync/easysync-full-description.tex
  25. BIN doc/easysync/easysync-notes.pdf
  26. +200 −0 doc/easysync/easysync-notes.tex
  27. +133 −0 doc/easysync/easysync-notes.txt
  28. +13 −0 node/README.md
  29. +520 −0 node/db/API.js
  30. +181 −0 node/db/AuthorManager.js
  31. +57 −0 node/db/DB.js
  32. +263 −0 node/db/GroupManager.js
  33. +488 −0 node/db/Pad.js
  34. +164 −0 node/db/PadManager.js
  35. +74 −0 node/db/ReadOnlyManager.js
  36. +280 −0 node/db/SecurityManager.js
  37. +367 −0 node/db/SessionManager.js
  38. +949 −0 node/easysync_tests.js
  39. +161 −0 node/handler/APIHandler.js
  40. +165 −0 node/handler/ExportHandler.js
  41. +191 −0 node/handler/ImportHandler.js
  42. +926 −0 node/handler/PadMessageHandler.js
  43. +163 −0 node/handler/SocketIORouter.js
  44. +529 −0 node/handler/TimesliderMessageHandler.js
  45. +494 −0 node/server.js
  46. +144 −0 node/utils/Abiword.js
  47. +38 −0 node/utils/Cli.js
  48. +345 −0 node/utils/ExportDokuWiki.js
  49. +595 −0 node/utils/ExportHtml.js
  50. +93 −0 node/utils/ImportHtml.js
  51. +338 −0 node/utils/Minify.js
  52. +135 −0 node/utils/Settings.js
  53. +24 −0 node/utils/common_code.js
  54. +17 −0 node/utils/customError.js
  55. +70 −0 node/utils/tar.json
  56. +8 −0 node_modules/read.me
  57. +21 −0 npm_global_module_list
  58. +32 −0 package.json
  59. +1 −0 server.js
  60. +26 −0 settings.json
  61. +203 −0 static/css/iframe_editor.css
  62. +1,264 −0 static/css/pad.css
  63. +106 −0 static/css/timeslider.css
  64. +8 −0 static/custom/css.template
  65. +8 −0 static/custom/index.css
  66. +6 −0 static/custom/index.js
  67. +6 −0 static/custom/js.template
  68. +8 −0 static/custom/pad.css
  69. +6 −0 static/custom/pad.js
  70. +8 −0 static/custom/timeslider.css
  71. +6 −0 static/custom/timeslider.js
  72. BIN static/favicon.ico
  73. BIN static/img/backgrad.gif
  74. BIN static/img/connectingbar.gif
  75. BIN static/img/crushed_button_depressed.png
  76. BIN static/img/crushed_button_undepressed.png
  77. BIN static/img/crushed_current_location.png
  78. BIN static/img/etherpad_lite_icons.png
  79. BIN static/img/fileicons.gif
  80. BIN static/img/leftarrow.png
  81. BIN static/img/loading.gif
  82. BIN static/img/pause.png
  83. BIN static/img/play.png
  84. BIN static/img/roundcorner_left.gif
  85. BIN static/img/roundcorner_right.gif
  86. BIN static/img/stepper_buttons.png
  87. BIN static/img/timeslider_background.png
  88. BIN static/img/timeslider_left.png
  89. BIN static/img/timeslider_right.png
  90. +155 −0 static/index.html
  91. +1 −0 static/js/AttributePoolFactory
  92. +90 −0 static/js/AttributePoolFactory.js
  93. +1 −0 static/js/Changeset
  94. +1,968 −0 static/js/Changeset.js
  95. +1 −0 static/js/ace
  96. +370 −0 static/js/ace.js
  97. +1 −0 static/js/ace2_common
  98. +157 −0 static/js/ace2_common.js
  99. +1 −0 static/js/ace2_inner
  100. +5,899 −0 static/js/ace2_inner.js
  101. +1 −0 static/js/broadcast
  102. +774 −0 static/js/broadcast.js
  103. +1 −0 static/js/broadcast_revisions
  104. +128 −0 static/js/broadcast_revisions.js
  105. +1 −0 static/js/broadcast_slider
  106. +504 −0 static/js/broadcast_slider.js
  107. +1 −0 static/js/changesettracker
  108. +213 −0 static/js/changesettracker.js
  109. +1 −0 static/js/chat
  110. +162 −0 static/js/chat.js
  111. +1 −0 static/js/collab_client
  112. +713 −0 static/js/collab_client.js
  113. +1 −0 static/js/colorutils
  114. +123 −0 static/js/colorutils.js
  115. +1 −0 static/js/contentcollector
  116. +692 −0 static/js/contentcollector.js
  117. +1 −0 static/js/cssmanager
  118. +122 −0 static/js/cssmanager.js
  119. +1 −0 static/js/domline
  120. +290 −0 static/js/domline.js
  121. +1 −0 static/js/draggable
  122. +197 −0 static/js/draggable.js
  123. +1 −0 static/js/excanvas
  124. +35 −0 static/js/excanvas.js
  125. +1 −0 static/js/farbtastic
  126. +524 −0 static/js/farbtastic.js
  127. +1 −0 static/js/jquery
  128. +9,266 −0 static/js/jquery.js
  129. +1 −0 static/js/json2
  130. +473 −0 static/js/json2.js
  131. +1 −0 static/js/linestylefilter
  132. +345 −0 static/js/linestylefilter.js
  133. +1 −0 static/js/pad
  134. +974 −0 static/js/pad.js
  135. +1 −0 static/js/pad_connectionstatus
  136. +91 −0 static/js/pad_connectionstatus.js
  137. +1 −0 static/js/pad_cookie
  138. +133 −0 static/js/pad_cookie.js
  139. +1 −0 static/js/pad_docbar
  140. +466 −0 static/js/pad_docbar.js
  141. +1 −0 static/js/pad_editbar
  142. +256 −0 static/js/pad_editbar.js
  143. +1 −0 static/js/pad_editor
  144. +162 −0 static/js/pad_editor.js
  145. +1 −0 static/js/pad_impexp
  146. +333 −0 static/js/pad_impexp.js
  147. +1 −0 static/js/pad_modals
  148. +374 −0 static/js/pad_modals.js
  149. +1 −0 static/js/pad_savedrevs
  150. +526 −0 static/js/pad_savedrevs.js
  151. +1 −0 static/js/pad_userlist
  152. +814 −0 static/js/pad_userlist.js
  153. +1 −0 static/js/pad_utils
  154. +528 −0 static/js/pad_utils.js
  155. +1 −0 static/js/plugins
  156. +37 −0 static/js/plugins.js
  157. +1 −0 static/js/prefixfree
  158. +419 −0 static/js/prefixfree.js
  159. +1 −0 static/js/security
  160. +54 −0 static/js/security.js
  161. +1 −0 static/js/skiplist
  162. +492 −0 static/js/skiplist.js
  163. +1 −0 static/js/timeslider
  164. +154 −0 static/js/timeslider.js
  165. +1 −0 static/js/undo-xpopup
  166. +34 −0 static/js/undo-xpopup.js
  167. +1 −0 static/js/undomodule
  168. +335 −0 static/js/undomodule.js
  169. +1 −0 static/js/virtual_lines
  170. +388 −0 static/js/virtual_lines.js
  171. +311 −0 static/pad.html
  172. +3 −0 static/robots.txt
  173. +165 −0 static/tests.html
  174. +218 −0 static/timeslider.html
  175. 0 var/.gitkeep
@@ -0,0 +1,5 @@
+#!/bin/bash
+# This is a simple build script and will be executed on your CI system if
+# available. Otherwise it will execute while your application is stopped
+# before the deploy step. This script gets executed directly, so it
+# could be python, php, ruby, etc.
@@ -0,0 +1,16 @@
+#!/bin/bash
+# This deploy hook gets executed after dependencies are resolved and the
+# build hook has been run but before the application has been started back
+# up again. This script gets executed directly, so it could be python, php,
+# ruby, etc.
+cp -v $OPENSHIFT_REPO_DIR/.openshift/mongodb_db.js $OPENSHIFT_GEAR_DIR/node_modules/ueberDB/
+
+settingsfile=$OPENSHIFT_REPO_DIR/settings.json
+
+sed -i 's/OPENSHIFT_INTERNAL_IP/'$OPENSHIFT_INTERNAL_IP'/' $settingsfile
+sed -i 's/OPENSHIFT_INTERNAL_PORT/'$OPENSHIFT_INTERNAL_PORT'/' $settingsfile
+sed -i 's/OPENSHIFT_NOSQL_DB_USERNAME/'$OPENSHIFT_NOSQL_DB_USERNAME'/' $settingsfile
+sed -i 's/OPENSHIFT_NOSQL_DB_HOST/'$OPENSHIFT_NOSQL_DB_HOST'/' $settingsfile
+sed -i 's/OPENSHIFT_NOSQL_DB_PORT/'$OPENSHIFT_NOSQL_DB_PORT'/' $settingsfile
+sed -i 's/OPENSHIFT_NOSQL_DB_PASSWORD/'$OPENSHIFT_NOSQL_DB_PASSWORD'/' $settingsfile
+sed -i 's/OPENSHIFT_APP_NAME/'$OPENSHIFT_APP_NAME'/' $settingsfile
@@ -0,0 +1,4 @@
+#!/bin/bash
+# This is a simple post deploy hook executed after your application
+# is deployed and started. This script gets executed directly, so
+# it could be python, php, ruby, etc.
@@ -0,0 +1,5 @@
+#!/bin/bash
+# This is a simple script and will be executed on your CI system if
+# available. Otherwise it will execute while your application is stopped
+# before the build step. This script gets executed directly, so it
+# could be python, php, ruby, etc.
@@ -0,0 +1,22 @@
+Run scripts or jobs on a periodic basis
+=======================================
+Any scripts or jobs added to the minutely, hourly, daily, weekly or monthly
+directories will be run on a scheduled basis (frequency is as indicated by the
+name of the directory) using run-parts.
+
+run-parts ignores any files that are hidden or dotfiles (.*) or backup
+files (*~ or *,) or named *.{rpmsave,rpmorig,rpmnew,swp,cfsaved}
+
+The presence of two specially named files jobs.deny and jobs.allow controls
+how run-parts executes your scripts/jobs.
+ jobs.deny ===> Prevents specific scripts or jobs from being executed.
+ jobs.allow ===> Only execute the named scripts or jobs (all other/non-named
+ scripts that exist in this directory are ignored).
+
+The principles of jobs.deny and jobs.allow are the same as those of cron.deny
+and cron.allow and are described in detail at:
+ http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Automating_System_Tasks.html#s2-autotasks-cron-access
+
+See: man crontab or above link for more details and see the the weekly/
+ directory for an example.
+
File renamed without changes.
No changes.
No changes.
No changes.
@@ -0,0 +1,16 @@
+Run scripts or jobs on a weekly basis
+=====================================
+Any scripts or jobs added to this directory will be run on a scheduled basis
+(weekly) using run-parts.
+
+run-parts ignores any files that are hidden or dotfiles (.*) or backup
+files (*~ or *,) or named *.{rpmsave,rpmorig,rpmnew,swp,cfsaved} and handles
+the files named jobs.deny and jobs.allow specially.
+
+In this specific example, the chronograph script is the only script or job file
+executed on a weekly basis (due to white-listing it in jobs.allow). And the
+README and chrono.dat file are ignored either as a result of being black-listed
+in jobs.deny or because they are NOT white-listed in the jobs.allow file.
+
+For more details, please see ../README.cron file.
+
@@ -0,0 +1 @@
+Time And Relative D...n In Execution (Open)Shift!
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "`date`: `cat $(dirname \"$0\")/chrono.dat`"
@@ -0,0 +1,12 @@
+#
+# Script or job files listed in here (one entry per line) will be
+# executed on a weekly-basis.
+#
+# Example: The chronograph script will be executed weekly but the README
+# and chrono.dat files in this directory will be ignored.
+#
+# The README file is actually ignored due to the entry in the
+# jobs.deny which is checked before jobs.allow (this file).
+#
+chronograph
+
@@ -0,0 +1,7 @@
+#
+# Any script or job files listed in here (one entry per line) will NOT be
+# executed (read as ignored by run-parts).
+#
+
+README
+
@@ -0,0 +1,7 @@
+Markers
+===========
+
+Adding marker files to this directory will have the following effects:
+
+force_clean_build - Will remove any previously installed npm modules and
+ re-install all the required modules from scratch
View
@@ -0,0 +1,162 @@
+/**
+ * Mariano Julio Vicario aka Ranu - TW: @el_ranu
+ * http://www.ranu.com.ar
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS-IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+exports.database = function (settings) {
+ this.db = null;
+ this.mongo = null;
+
+ if (!settings || typeof settings.dbname != 'string' || typeof settings.port != 'number') {
+ throw "some settings are incorrect or not complete";
+ }
+
+ this.settings = settings;
+ this.settings.cache = 1000;
+ this.settings.writeInterval = 100;
+ this.settings.json = true;
+
+}
+
+exports.database.prototype.init = function(callback) {
+ this.mongo = new MongoKeyValue(this.settings.dbname, this.settings.host, this.settings.port, this.settings.user, this.settings.password, function (err) {
+ callback(err);
+ }, this.settings.collectionName);
+}
+
+exports.database.prototype.get = function (key, callback) {
+ this.mongo.findOne(key, callback);
+}
+
+exports.database.prototype.set = function (key, value, callback) {
+ this.mongo.set(key, value, callback);
+}
+
+exports.database.prototype.remove = function (key, callback) {
+ this.mongo.remove(key, callback);
+}
+
+exports.database.prototype.doBulk = function (bulk, callback) {
+ this.mongo.bulk(bulk, callback);
+}
+
+exports.database.prototype.close = function (callback) {
+ this.mongo.close(callback);
+ this.mongo = null;
+}
+
+function escape (val)
+{
+ return "'"+val.replace(/'/g, "''")+"'";
+};
+
+
+function MongoKeyValue(dbName, dbHost, dbPort, dbUser, dbPass, fncallback, collectionname) {
+ fncallback = typeof (fncallback) == 'function' ? fncallback : null ;
+ var mongodb = require('mongodb').Db;
+ var Server = require('mongodb').Server;
+ var Connection = require('mongodb').Connection;
+ this.collectionName = typeof collectionname === 'string' ? collectionname : "store";
+
+ this.db = new mongodb(dbName, new Server(dbHost, dbPort, { auto_reconnect: true }), {});
+ this.collection = null;
+ var me = this;
+ var callback = fncallback;
+ this.db.open(function (err, colle) {
+ me.collection = colle;
+ if (dbUser && dbPass) {
+ me.db.authenticate(dbUser, dbPass, function (err) {
+ ensureIndex();
+ callback(err);
+ });
+ }
+ else {
+ ensureIndex();
+ callback(err);
+ }
+
+ });
+
+ function ensureIndex() {
+ me.db.collection(me.collectionName, function (err, collection) {
+ collection.ensureIndex({key :1}, function(err, name){
+ var name;
+ });
+ });
+ }
+
+
+ this.findOne = function (key, callback) {
+ me.db.collection(me.collectionName, function (err, collection) {
+ if (err) callback(err);
+ var p = collection.findOne({ key: key }, function (err, ret) {
+ if (ret)
+ callback(err, ret.val);
+ else
+ callback(err, ret);
+ })
+ });
+ }
+
+ this.set = function (key, value, callback) {
+ me.db.collection(me.collectionName, function (err, collection) {
+ collection.update({key: key}, { key: key, val: value }, { safe: true, upsert: true }, function (err, docs) {
+ callback(err);
+ });
+ });
+ }
+
+ this.bulk = function (bulk, callback) {
+ var co = 1;
+ me.db.collection(me.collectionName, function (err, collection) {
+ for (var i in bulk) {
+ if (bulk[i].type == "set") {
+ collection.update({ key: bulk[i].key }, { key: bulk[i].key, val: bulk[i].value }, { safe: true, upsert: true }, function (err, docs) {
+ if (err) console.log(err);
+ if (co === bulk.length) {
+ callback(err);
+ co= 1;
+ }
+ co++;
+ });
+ }
+ else if (bulk[i].type == "remove") {
+ collection.remove({ key: bulk[i].key }, { safe: true }, function (err) {
+ if (err) console.log(err);
+ if ( co === bulk.length) {
+ callback(err);
+ co = 1;
+ }
+ co++;
+ });
+ }
+ }
+ });
+ }
+
+ this.remove = function (key, callback) {
+ me.db.collection(me.collectionName, function (err, collection) {
+ collection.remove({ key: key }, { safe: true }, function (err) {
+ callback(err);
+ });
+ });
+ }
+
+ this.close = function (callback) {
+ me.db.close(function (err) {
+ callback(err);
+ });
+ }
+}
View
@@ -0,0 +1,4 @@
+# v 1.0.1
+
+* Updated MySQL driver, this fixes some problems with mysql
+* Fixed export,import and timeslider link when embed parameters are used
Oops, something went wrong.

0 comments on commit 6ee41d0

Please sign in to comment.