├── assets ├── js │ ├── .gitkeep │ └── main.js ├── styles │ └── .gitkeep ├── templates │ └── .gitkeep └── mixins │ └── reset.css ├── api ├── adapters │ └── .gitkeep ├── models │ ├── .gitkeep │ ├── User.js │ └── Cite.js ├── services │ └── .gitkeep ├── controllers │ ├── .gitkeep │ ├── CiteController.js │ ├── UserController.js │ └── MainController.js └── policies │ └── authenticated.js ├── public ├── images │ └── .gitkeep ├── js │ └── ace │ │ ├── snippets │ │ ├── d.snippets │ │ ├── abap.snippets │ │ ├── ada.snippets │ │ ├── cobol.snippets │ │ ├── csharp.snippets │ │ ├── curly.snippets │ │ ├── dot.snippets │ │ ├── ejs.snippets │ │ ├── forth.snippets │ │ ├── ftl.snippets │ │ ├── glsl.snippets │ │ ├── golang.snippets │ │ ├── groovy.snippets │ │ ├── haxe.snippets │ │ ├── ini.snippets │ │ ├── jade.snippets │ │ ├── json.snippets │ │ ├── jsoniq.snippets │ │ ├── jsx.snippets │ │ ├── julia.snippets │ │ ├── latex.snippets │ │ ├── less.snippets │ │ ├── liquid.snippets │ │ ├── lisp.snippets │ │ ├── logiql.snippets │ │ ├── lucene.snippets │ │ ├── matlab.snippets │ │ ├── mysql.snippets │ │ ├── ocaml.snippets │ │ ├── pascal.snippets │ │ ├── pgsql.snippets │ │ ├── prolog.snippets │ │ ├── rdoc.snippets │ │ ├── rhtml.snippets │ │ ├── rust.snippets │ │ ├── sass.snippets │ │ ├── scad.snippets │ │ ├── scala.snippets │ │ ├── scheme.snippets │ │ ├── scss.snippets │ │ ├── stylus.snippets │ │ ├── svg.snippets │ │ ├── text.snippets │ │ ├── toml.snippets │ │ ├── twig.snippets │ │ ├── xml.snippets │ │ ├── xquery.snippets │ │ ├── yaml.snippets │ │ ├── asciidoc.snippets │ │ ├── autohotkey.snippets │ │ ├── batchfile.snippets │ │ ├── c9search.snippets │ │ ├── coldfusion.snippets │ │ ├── html_ruby.snippets │ │ ├── livescript.snippets │ │ ├── luapage.snippets │ │ ├── mushcode.snippets │ │ ├── objectivec.snippets │ │ ├── powershell.snippets │ │ ├── properties.snippets │ │ ├── tmsnippet.snippets │ │ ├── typescript.snippets │ │ ├── vbscript.snippets │ │ ├── velocity.snippets │ │ ├── verilog.snippets │ │ ├── assembly_x86.snippets │ │ ├── mushcode_high_rules.snippets │ │ ├── makefile.snippets │ │ ├── ledger.snippets │ │ ├── d.js │ │ ├── r.js │ │ ├── sh.js │ │ ├── ada.js │ │ ├── css.js │ │ ├── dot.js │ │ ├── ejs.js │ │ ├── ftl.js │ │ ├── ini.js │ │ ├── jsp.js │ │ ├── jsx.js │ │ ├── lsl.js │ │ ├── lua.js │ │ ├── php.js │ │ ├── sql.js │ │ ├── svg.js │ │ ├── tcl.js │ │ ├── tex.js │ │ ├── xml.js │ │ ├── abap.js │ │ ├── c_cpp.js │ │ ├── cobol.js │ │ ├── curly.js │ │ ├── dart.js │ │ ├── diff.js │ │ ├── forth.js │ │ ├── glsl.js │ │ ├── haml.js │ │ ├── haxe.js │ │ ├── html.js │ │ ├── jade.js │ │ ├── java.js │ │ ├── json.js │ │ ├── julia.js │ │ ├── latex.js │ │ ├── less.js │ │ ├── lisp.js │ │ ├── mysql.js │ │ ├── ocaml.js │ │ ├── perl.js │ │ ├── pgsql.js │ │ ├── rdoc.js │ │ ├── rhtml.js │ │ ├── ruby.js │ │ ├── rust.js │ │ ├── sass.js │ │ ├── scad.js │ │ ├── scala.js │ │ ├── scss.js │ │ ├── text.js │ │ ├── toml.js │ │ ├── twig.js │ │ ├── yaml.js │ │ ├── clojure.js │ │ ├── coffee.js │ │ ├── csharp.js │ │ ├── django.js │ │ ├── erlang.js │ │ ├── golang.js │ │ ├── groovy.js │ │ ├── haskell.js │ │ ├── jsoniq.js │ │ ├── liquid.js │ │ ├── logiql.js │ │ ├── luapage.js │ │ ├── lucene.js │ │ ├── matlab.js │ │ ├── pascal.js │ │ ├── prolog.js │ │ ├── python.js │ │ ├── scheme.js │ │ ├── stylus.js │ │ ├── textile.js │ │ ├── verilog.js │ │ ├── xquery.js │ │ ├── asciidoc.js │ │ ├── c9search.js │ │ ├── makefile.js │ │ ├── markdown.js │ │ ├── mushcode.js │ │ ├── snippets.js │ │ ├── vbscript.js │ │ ├── velocity.js │ │ ├── autohotkey.js │ │ ├── batchfile.js │ │ ├── coldfusion.js │ │ ├── html_ruby.js │ │ ├── javascript.js │ │ ├── livescript.js │ │ ├── objectivec.js │ │ ├── powershell.js │ │ ├── properties.js │ │ ├── typescript.js │ │ ├── actionscript.js │ │ ├── assembly_x86.js │ │ ├── snippets.snippets │ │ ├── mushcode_high_rules.js │ │ ├── haml.snippets │ │ ├── rst.snippets │ │ ├── diff.snippets │ │ ├── lua.snippets │ │ ├── textile.snippets │ │ ├── apache.snippets │ │ ├── sql.snippets │ │ ├── mako.snippets │ │ ├── cmake.snippets │ │ ├── htmltornado.snippets │ │ ├── falcon.snippets │ │ ├── autoit.snippets │ │ ├── dart.snippets │ │ ├── tcl.snippets │ │ ├── haskell.snippets │ │ ├── markdown.snippets │ │ └── sh.snippets │ │ ├── mode │ │ ├── _test │ │ │ ├── text_livescript.txt │ │ │ ├── tokens_livescript.json │ │ │ ├── text_html.txt │ │ │ ├── package.json │ │ │ ├── text_xml.txt │ │ │ ├── text_curly.txt │ │ │ ├── Readme.md │ │ │ ├── text_markdown.txt │ │ │ ├── tokens_coldfusion.json │ │ │ ├── text_lucene.txt │ │ │ ├── tokens_csharp.json │ │ │ ├── text_ruby.txt │ │ │ ├── tokens_xquery.json │ │ │ ├── tokens_xml.json │ │ │ ├── tokens_jsx.json │ │ │ ├── tokens_sql.json │ │ │ ├── tokens_html.json │ │ │ ├── tokens_curly.json │ │ │ ├── text_coffee.txt │ │ │ ├── text_javascript.txt │ │ │ ├── tokens_markdown.json │ │ │ ├── text_asciidoc.txt │ │ │ └── tokens_java.json │ │ ├── xquery │ │ │ └── Readme.md │ │ ├── lucene.js │ │ ├── luapage.js │ │ ├── latex.js │ │ ├── groovy.js │ │ ├── java.js │ │ ├── scala.js │ │ ├── latex_highlight_rules.js │ │ ├── luapage_highlight_rules.js │ │ ├── rdoc.js │ │ ├── lucene_highlight_rules.js │ │ ├── tex.js │ │ ├── dot.js │ │ ├── jsx.js │ │ ├── rhtml_highlight_rules.js │ │ ├── haxe.js │ │ ├── golang.js │ │ ├── csharp.js │ │ └── powershell.js │ │ ├── css │ │ ├── expand-marker.png │ │ └── codefolding-fold-button-states.png │ │ ├── test │ │ ├── asyncjs │ │ │ ├── index.js │ │ │ └── utils.js │ │ ├── mockdom.js │ │ ├── tests.html │ │ └── all.js │ │ ├── ext │ │ ├── static.css │ │ ├── themelist_utils │ │ │ └── themes.js │ │ ├── menu_tools │ │ │ └── settings_menu.css │ │ ├── statusbar.js │ │ └── split.js │ │ ├── lib │ │ ├── fixoldbrowsers.js │ │ └── net.js │ │ ├── worker │ │ └── mirror.js │ │ ├── theme │ │ ├── chaos.js │ │ ├── ambiance.js │ │ ├── dawn.js │ │ ├── cobalt.js │ │ ├── xcode.js │ │ ├── chrome.js │ │ ├── clouds.js │ │ ├── monokai.js │ │ ├── github.js │ │ ├── kr_theme.js │ │ ├── merbivore.js │ │ ├── tomorrow.js │ │ ├── twilight.js │ │ ├── dreamweaver.js │ │ ├── terminal.js │ │ ├── vibrant_ink.js │ │ ├── idle_fingers.js │ │ ├── merbivore_soft.js │ │ ├── pastel_on_dark.js │ │ ├── solarized_dark.js │ │ ├── textmate.js │ │ ├── tomorrow_night.js │ │ ├── clouds_midnight.js │ │ ├── crimson_editor.js │ │ ├── eclipse.js │ │ ├── mono_industrial.js │ │ ├── solarized_light.js │ │ ├── tomorrow_night_blue.js │ │ ├── tomorrow_night_bright.js │ │ └── tomorrow_night_eighties.js │ │ └── keyboard │ │ └── vim │ │ └── registers.js ├── favicon.ico └── robots.txt ├── README.md ├── config ├── views.js ├── locales │ └── english.js ├── bootstrap.js ├── assets.js ├── policies.js ├── application.js └── adapters.js ├── app.js ├── cite.sublime-project ├── package.json ├── .gitignore └── views ├── main └── index.ejs ├── layout.ejs ├── 404.ejs └── 500.ejs /assets/js/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/adapters/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/services/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/styles/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/templates/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/d.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/abap.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ada.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/cobol.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/csharp.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/curly.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/dot.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ejs.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/forth.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ftl.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/glsl.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/golang.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/groovy.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/haxe.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ini.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/jade.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/json.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/jsoniq.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/jsx.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/julia.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/latex.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/less.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/liquid.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/lisp.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/logiql.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/lucene.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/matlab.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/mysql.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ocaml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/pascal.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/pgsql.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/prolog.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/rdoc.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/rhtml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/rust.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/sass.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scad.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scala.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scheme.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scss.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/stylus.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/svg.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/text.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/toml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/twig.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/xml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/xquery.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/yaml.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cite 2 | ### a Sails application -------------------------------------------------------------------------------- /public/js/ace/snippets/asciidoc.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/autohotkey.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/batchfile.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/c9search.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/coldfusion.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/html_ruby.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/livescript.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/luapage.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/mushcode.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/objectivec.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/powershell.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/properties.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/tmsnippet.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/typescript.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/vbscript.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/velocity.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/verilog.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/assembly_x86.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/snippets/mushcode_high_rules.snippets: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_livescript.txt: -------------------------------------------------------------------------------- 1 | # comment 2 | -------------------------------------------------------------------------------- /config/views.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'viewEngine': 'ejs' 3 | }; -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/cite/master/public/favicon.ico -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | // Start sails and pass it command line arguments 2 | require('sails').lift(require('optimist').argv); 3 | -------------------------------------------------------------------------------- /public/js/ace/css/expand-marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/cite/master/public/js/ace/css/expand-marker.png -------------------------------------------------------------------------------- /public/js/ace/snippets/makefile.snippets: -------------------------------------------------------------------------------- 1 | snippet ifeq 2 | ifeq (${1:cond0},${2:cond1}) 3 | ${3:code} 4 | endif 5 | -------------------------------------------------------------------------------- /config/locales/english.js: -------------------------------------------------------------------------------- 1 | /* 2 | * English string set 3 | * 4 | */ 5 | var english = { 6 | 7 | }; 8 | module.exports = english; -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_livescript.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["comment","# comment"] 4 | ],[ 5 | "start" 6 | ]] -------------------------------------------------------------------------------- /public/js/ace/css/codefolding-fold-button-states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkh44/cite/master/public/js/ace/css/codefolding-fold-button-states.png -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_html.txt: -------------------------------------------------------------------------------- 1 | 2 | '123' 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ledger.snippets: -------------------------------------------------------------------------------- 1 | # Ledger 2 | snippet ent 3 | `strftime("%Y/%m/%d")` ${1:transaction} 4 | ${2:account} ${3:value} 5 | ${4:account} 6 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ace-mode-creator", 3 | "version": "0.1.0", 4 | "dependencies": { 5 | "connect": "", 6 | "socket.io": "" 7 | } 8 | } -------------------------------------------------------------------------------- /config/bootstrap.js: -------------------------------------------------------------------------------- 1 | // App bootstrap 2 | // Code to run before launching the app 3 | // 4 | // Make sure you call cb() when you're finished. 5 | module.exports.bootstrap = function (cb) { 6 | cb(); 7 | }; -------------------------------------------------------------------------------- /public/js/ace/snippets/d.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./d.snippets"); 5 | exports.scope = "d"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/r.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./r.snippets"); 5 | exports.scope = "r"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/sh.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./sh.snippets"); 5 | exports.scope = "sh"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /api/controllers/CiteController.js: -------------------------------------------------------------------------------- 1 | /*--------------------- 2 | :: Cite 3 | -> controller 4 | ---------------------*/ 5 | var CiteController = { 6 | 7 | 8 | 9 | }; 10 | module.exports = CiteController; -------------------------------------------------------------------------------- /api/controllers/UserController.js: -------------------------------------------------------------------------------- 1 | /*--------------------- 2 | :: User 3 | -> controller 4 | ---------------------*/ 5 | var UserController = { 6 | 7 | 8 | 9 | }; 10 | module.exports = UserController; -------------------------------------------------------------------------------- /public/js/ace/snippets/ada.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ada.snippets"); 5 | exports.scope = "ada"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/css.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./css.snippets"); 5 | exports.scope = "css"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/dot.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./dot.snippets"); 5 | exports.scope = "dot"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ejs.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ejs.snippets"); 5 | exports.scope = "ejs"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ftl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ftl.snippets"); 5 | exports.scope = "ftl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ini.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ini.snippets"); 5 | exports.scope = "ini"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/jsp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jsp.snippets"); 5 | exports.scope = "jsp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/jsx.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jsx.snippets"); 5 | exports.scope = "jsx"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/lsl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lsl.snippets"); 5 | exports.scope = "lsl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/lua.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lua.snippets"); 5 | exports.scope = "lua"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/php.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./php.snippets"); 5 | exports.scope = "php"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/sql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./sql.snippets"); 5 | exports.scope = "sql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/svg.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./svg.snippets"); 5 | exports.scope = "svg"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/tcl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./tcl.snippets"); 5 | exports.scope = "tcl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/tex.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./tex.snippets"); 5 | exports.scope = "tex"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/xml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./xml.snippets"); 5 | exports.scope = "xml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/abap.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./abap.snippets"); 5 | exports.scope = "abap"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/c_cpp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./c_cpp.snippets"); 5 | exports.scope = "c_cpp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/cobol.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./cobol.snippets"); 5 | exports.scope = "cobol"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/curly.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./curly.snippets"); 5 | exports.scope = "curly"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/dart.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./dart.snippets"); 5 | exports.scope = "dart"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/diff.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./diff.snippets"); 5 | exports.scope = "diff"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/forth.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./forth.snippets"); 5 | exports.scope = "forth"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/glsl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./glsl.snippets"); 5 | exports.scope = "glsl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/haml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./haml.snippets"); 5 | exports.scope = "haml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/haxe.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./haxe.snippets"); 5 | exports.scope = "haxe"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/html.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./html.snippets"); 5 | exports.scope = "html"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/jade.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jade.snippets"); 5 | exports.scope = "jade"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/java.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./java.snippets"); 5 | exports.scope = "java"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/json.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./json.snippets"); 5 | exports.scope = "json"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/julia.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./julia.snippets"); 5 | exports.scope = "julia"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/latex.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./latex.snippets"); 5 | exports.scope = "latex"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/less.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./less.snippets"); 5 | exports.scope = "less"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/lisp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lisp.snippets"); 5 | exports.scope = "lisp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/mysql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./mysql.snippets"); 5 | exports.scope = "mysql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ocaml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ocaml.snippets"); 5 | exports.scope = "ocaml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/perl.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./perl.snippets"); 5 | exports.scope = "perl"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/pgsql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./pgsql.snippets"); 5 | exports.scope = "pgsql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/rdoc.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./rdoc.snippets"); 5 | exports.scope = "rdoc"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/rhtml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./rhtml.snippets"); 5 | exports.scope = "rhtml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/ruby.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./ruby.snippets"); 5 | exports.scope = "ruby"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/rust.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./rust.snippets"); 5 | exports.scope = "rust"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/sass.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./sass.snippets"); 5 | exports.scope = "sass"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scad.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scad.snippets"); 5 | exports.scope = "scad"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scala.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scala.snippets"); 5 | exports.scope = "scala"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scss.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scss.snippets"); 5 | exports.scope = "scss"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/text.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./text.snippets"); 5 | exports.scope = "text"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/toml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./toml.snippets"); 5 | exports.scope = "toml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/twig.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./twig.snippets"); 5 | exports.scope = "twig"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/yaml.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./yaml.snippets"); 5 | exports.scope = "yaml"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/clojure.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./clojure.snippets"); 5 | exports.scope = "clojure"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/coffee.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./coffee.snippets"); 5 | exports.scope = "coffee"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/csharp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./csharp.snippets"); 5 | exports.scope = "csharp"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/django.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./django.snippets"); 5 | exports.scope = "django"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/erlang.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./erlang.snippets"); 5 | exports.scope = "erlang"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/golang.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./golang.snippets"); 5 | exports.scope = "golang"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/groovy.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./groovy.snippets"); 5 | exports.scope = "groovy"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/haskell.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./haskell.snippets"); 5 | exports.scope = "haskell"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/jsoniq.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./jsoniq.snippets"); 5 | exports.scope = "jsoniq"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/liquid.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./liquid.snippets"); 5 | exports.scope = "liquid"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/logiql.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./logiql.snippets"); 5 | exports.scope = "logiql"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/luapage.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./luapage.snippets"); 5 | exports.scope = "luapage"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/lucene.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./lucene.snippets"); 5 | exports.scope = "lucene"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/matlab.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./matlab.snippets"); 5 | exports.scope = "matlab"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/pascal.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./pascal.snippets"); 5 | exports.scope = "pascal"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/prolog.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./prolog.snippets"); 5 | exports.scope = "prolog"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/python.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./python.snippets"); 5 | exports.scope = "python"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/scheme.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./scheme.snippets"); 5 | exports.scope = "scheme"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/stylus.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./stylus.snippets"); 5 | exports.scope = "stylus"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/textile.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./textile.snippets"); 5 | exports.scope = "textile"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/verilog.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./verilog.snippets"); 5 | exports.scope = "verilog"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/xquery.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./xquery.snippets"); 5 | exports.scope = "xquery"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /api/models/User.js: -------------------------------------------------------------------------------- 1 | /*--------------------- 2 | :: User 3 | -> model 4 | ---------------------*/ 5 | module.exports = { 6 | attributes : { 7 | username: 'STRING', 8 | password: 'STRING' 9 | } 10 | }; -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_xml.txt: -------------------------------------------------------------------------------- 1 | //Juhu Kinners 2 | test: two tags in the same lines should be in separate tokens" 3 | 4 | test: multiline attributes" 5 | -------------------------------------------------------------------------------- /public/js/ace/snippets/asciidoc.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./asciidoc.snippets"); 5 | exports.scope = "asciidoc"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/c9search.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./c9search.snippets"); 5 | exports.scope = "c9search"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/makefile.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./makefile.snippets"); 5 | exports.scope = "makefile"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/markdown.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./markdown.snippets"); 5 | exports.scope = "markdown"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/mushcode.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./mushcode.snippets"); 5 | exports.scope = "mushcode"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/snippets.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./snippets.snippets"); 5 | exports.scope = "snippets"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/vbscript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./vbscript.snippets"); 5 | exports.scope = "vbscript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/velocity.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./velocity.snippets"); 5 | exports.scope = "velocity"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/autohotkey.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./autohotkey.snippets"); 5 | exports.scope = "autohotkey"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/batchfile.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./batchfile.snippets"); 5 | exports.scope = "batchfile"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/coldfusion.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./coldfusion.snippets"); 5 | exports.scope = "coldfusion"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/html_ruby.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./html_ruby.snippets"); 5 | exports.scope = "html_ruby"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/javascript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./javascript.snippets"); 5 | exports.scope = "javascript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/livescript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./livescript.snippets"); 5 | exports.scope = "livescript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/objectivec.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./objectivec.snippets"); 5 | exports.scope = "objectivec"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/powershell.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./powershell.snippets"); 5 | exports.scope = "powershell"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/properties.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./properties.snippets"); 5 | exports.scope = "properties"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/typescript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./typescript.snippets"); 5 | exports.scope = "typescript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/actionscript.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./actionscript.snippets"); 5 | exports.scope = "actionscript"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/assembly_x86.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./assembly_x86.snippets"); 5 | exports.scope = "assembly_x86"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /public/js/ace/snippets/snippets.snippets: -------------------------------------------------------------------------------- 1 | # snippets for making snippets :) 2 | snippet snip 3 | snippet ${1:trigger} 4 | ${2} 5 | snippet msnip 6 | snippet ${1:trigger} ${2:description} 7 | ${3} 8 | snippet v 9 | {VISUAL} 10 | -------------------------------------------------------------------------------- /public/js/ace/snippets/mushcode_high_rules.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText = require("../requirejs/text!./mushcode_high_rules.snippets"); 5 | exports.scope = "mushcode_high_rules"; 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /api/models/Cite.js: -------------------------------------------------------------------------------- 1 | /*--------------------- 2 | :: Cite 3 | -> model 4 | ---------------------*/ 5 | module.exports = { 6 | 7 | attributes : { 8 | userId: 'INT', 9 | username: 'STRING', 10 | title: 'STRING', 11 | body: 'STRING' 12 | } 13 | 14 | }; -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # The robots.txt file is used to control how search engines index your live URLs. 2 | # See http://www.robotstxt.org/wc/norobots.html for more information. 3 | # 4 | # To prevent search engines from seeing the site altogether, uncomment the next two lines: 5 | # User-Agent: * 6 | # Disallow: / 7 | -------------------------------------------------------------------------------- /public/js/ace/mode/xquery/Readme.md: -------------------------------------------------------------------------------- 1 | WARNING! 2 | ============================ 3 | 4 | Files in this folder are generated automatically from the xquery.js project (https://github.com/wcandillon/xquery.js). 5 | Instructions on how to generate the XQuery parser are available at https://github.com/wcandillon/xquery.js 6 | 7 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_curly.txt: -------------------------------------------------------------------------------- 1 | tokenize Curly template{{test}} 2 | tokenize embedded script 3 | '123' 4 | tokenize multiline attribute value with double quotes 5 | 7 | tokenize multiline attribute value with single quotes 8 | 10 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/Readme.md: -------------------------------------------------------------------------------- 1 | `tokens_.json` files keep information about correct tokens and tokenizer states for all modes supported by ace. 2 | They are generated from `text_.txt` or `demo/kitchen-sink/doc/*` with 3 | 4 | ```sh 5 | node highlight_rules_test.js -gen 6 | ``` 7 | 8 | command. 9 | 10 | -------------------------------------------------------------------------------- /public/js/ace/test/asyncjs/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * async.js 3 | * Copyright(c) 2010 Fabian Jakobs 4 | * MIT Licensed 5 | */ 6 | 7 | define(function(require, exports, module) { 8 | 9 | module.exports = require("./async") 10 | module.exports.test = require("./test") 11 | require("./utils") 12 | 13 | }) 14 | -------------------------------------------------------------------------------- /api/policies/authenticated.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Allow any authenticated user. 3 | */ 4 | module.exports = function (req,res,ok) { 5 | 6 | // User is allowed, proceed to controller 7 | if (req.session.authenticated) { 8 | return ok(); 9 | } 10 | 11 | // User is not allowed 12 | else { 13 | return res.send("You are not permitted to perform this action.",403); 14 | } 15 | }; -------------------------------------------------------------------------------- /public/js/ace/snippets/haml.snippets: -------------------------------------------------------------------------------- 1 | snippet t 2 | %table 3 | %tr 4 | %th 5 | ${1:headers} 6 | %tr 7 | %td 8 | ${2:headers} 9 | snippet ul 10 | %ul 11 | %li 12 | ${1:item} 13 | %li 14 | snippet =rp 15 | = render :partial => '${1:partial}' 16 | snippet =rpl 17 | = render :partial => '${1:partial}', :locals => {} 18 | snippet =rpc 19 | = render :partial => '${1:partial}', :collection => @$1 20 | 21 | -------------------------------------------------------------------------------- /public/js/ace/snippets/rst.snippets: -------------------------------------------------------------------------------- 1 | # rst 2 | 3 | snippet : 4 | :${1:field name}: ${2:field body} 5 | snippet * 6 | *${1:Emphasis}* 7 | snippet ** 8 | **${1:Strong emphasis}** 9 | snippet _ 10 | \`${1:hyperlink-name}\`_ 11 | .. _\`$1\`: ${2:link-block} 12 | snippet = 13 | ${1:Title} 14 | =====${2:=} 15 | ${3} 16 | snippet - 17 | ${1:Title} 18 | -----${2:-} 19 | ${3} 20 | snippet cont: 21 | .. contents:: 22 | 23 | -------------------------------------------------------------------------------- /public/js/ace/test/mockdom.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var dom = require('jsdom/lib/jsdom/level2/html').dom.level2.html; 4 | var browser = require('jsdom/lib/jsdom/browser/index').windowAugmentation(dom); 5 | 6 | global.document = browser.document; 7 | global.window = browser.window; 8 | global.self = browser.self; 9 | global.navigator = browser.navigator; 10 | global.location = browser.location; 11 | -------------------------------------------------------------------------------- /cite.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": "/Users/kye/Dropbox/github/cite" 6 | } 7 | ], 8 | "settings": 9 | { 10 | "SublimeLinter": 11 | { 12 | "browser": true, 13 | "indent": 4, 14 | "quotmark": "single", 15 | "predef": [ 16 | "require", 17 | "module" 18 | ] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cite", 3 | "private": true, 4 | "version": "0.0.0", 5 | "description": "a Sails application", 6 | "dependencies": { 7 | "sails": "0.8.91", 8 | "optimist": "0.4.0" 9 | }, 10 | "scripts": { 11 | "start": "node app.js", 12 | "debug": "node debug app.js" 13 | }, 14 | "main": "app.js", 15 | "repository": "", 16 | "author": "", 17 | "license": "MIT" 18 | } -------------------------------------------------------------------------------- /config/assets.js: -------------------------------------------------------------------------------- 1 | // Asset rack configuration 2 | module.exports.assets = { 3 | 4 | // A list of directories, in order, which will be recursively parsed for css, javascript, and templates 5 | // and then can be automatically injected in your layout/views via the view partials: 6 | // ( assets.css(), assets.js() and assets.templateLibrary() ) 7 | sequence: [ 8 | 'assets/mixins', 9 | 'assets/js', 10 | 'assets/styles', 11 | 'assets/templates' 12 | ] 13 | }; 14 | -------------------------------------------------------------------------------- /public/js/ace/snippets/diff.snippets: -------------------------------------------------------------------------------- 1 | # DEP-3 (http://dep.debian.net/deps/dep3/) style patch header 2 | snippet header DEP-3 style header 3 | Description: ${1} 4 | Origin: ${2:vendor|upstream|other}, ${3:url of the original patch} 5 | Bug: ${4:url in upstream bugtracker} 6 | Forwarded: ${5:no|not-needed|url} 7 | Author: ${6:`g:snips_author`} 8 | Reviewed-by: ${7:name and email} 9 | Last-Update: ${8:`strftime("%Y-%m-%d")`} 10 | Applied-Upstream: ${9:upstream version|url|commit} 11 | 12 | -------------------------------------------------------------------------------- /public/js/ace/snippets/lua.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env lua 3 | $1 4 | snippet local 5 | local ${1:x} = ${2:1} 6 | snippet fun 7 | function ${1:fname}(${2:...}) 8 | ${3:-- body} 9 | end 10 | snippet for 11 | for ${1:i}=${2:1},${3:10} do 12 | ${4:print(i)} 13 | end 14 | snippet forp 15 | for ${1:i},${2:v} in pairs(${3:table_name}) do 16 | ${4:-- body} 17 | end 18 | snippet fori 19 | for ${1:i},${2:v} in ipairs(${3:table_name}) do 20 | ${4:-- body} 21 | end 22 | -------------------------------------------------------------------------------- /public/js/ace/mode/lucene.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | 'use strict'; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextMode = require("./text").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; 8 | 9 | var Mode = function() { 10 | this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules()); 11 | }; 12 | 13 | oop.inherits(Mode, TextMode); 14 | 15 | exports.Mode = Mode; 16 | }); -------------------------------------------------------------------------------- /public/js/ace/ext/static.css: -------------------------------------------------------------------------------- 1 | .ace_editor { 2 | font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace; 3 | font-size: 12px; 4 | } 5 | 6 | .ace_editor .ace_gutter { 7 | width: 25px !important; 8 | display: block; 9 | float: left; 10 | text-align: right; 11 | padding: 0 3px 0 0; 12 | margin-right: 3px; 13 | } 14 | 15 | .ace_line { clear: both; } 16 | 17 | *.ace_gutter-cell { 18 | -moz-user-select: -moz-none; 19 | -khtml-user-select: none; 20 | -webkit-user-select: none; 21 | user-select: none; 22 | } -------------------------------------------------------------------------------- /public/js/ace/snippets/textile.snippets: -------------------------------------------------------------------------------- 1 | # Jekyll post header 2 | snippet header 3 | --- 4 | title: ${1:title} 5 | layout: post 6 | date: ${2:date} ${3:hour:minute:second} -05:00 7 | --- 8 | 9 | # Image 10 | snippet img 11 | !${1:url}(${2:title}):${3:link}! 12 | 13 | # Table 14 | snippet | 15 | |${1}|${2} 16 | 17 | # Link 18 | snippet link 19 | "${1:link text}":${2:url} 20 | 21 | # Acronym 22 | snippet ( 23 | (${1:Expand acronym})${2} 24 | 25 | # Footnote 26 | snippet fn 27 | [${1:ref number}] ${3} 28 | 29 | fn$1. ${2:footnote} 30 | 31 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_markdown.txt: -------------------------------------------------------------------------------- 1 | test: header 1 2 | #f 3 | test: header 2 4 | ## foo 5 | test: header ends with ' #' 6 | # # # 7 | test: header ends with '#' 8 | #foo# 9 | test: 6+ #s is not a valid header 10 | ####### foo 11 | test: # followed be only space is not a valid header 12 | # 13 | test: only space between #s is not a valid header 14 | # # 15 | 16 | # test links [Cloud9 IDE](http://www.c9.io/) # 17 | * [demo](http://ajaxorg.github.com/ace/) 18 | * usually *work* fine (_em_) 19 | in lists 20 | 21 | in plain text http://ace.ajaxorg.com 22 | 23 | -------------------------------------------------------------------------------- /config/policies.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Policy defines middleware that is run before each controller/controller. 3 | * Any policy dropped into the /middleware directory is made globally available through sails.middleware 4 | * Below, use the string name of the middleware 5 | */ 6 | module.exports.policies = { 7 | 8 | // Default policy (allow public access) 9 | '*': true 10 | 11 | /** Example mapping: 12 | someController: { 13 | 14 | // Apply the "authenticated" policy to all actions 15 | '*': 'authenticated', 16 | 17 | // For someAction, apply 'somePolicy' instead 18 | someAction: 'somePolicy' 19 | } 20 | */ 21 | }; -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_coldfusion.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["comment",""] 4 | ],[ 5 | "start" 6 | ],[ 7 | "start", 8 | ["meta.tag","<"], 9 | ["meta.tag.tag-name","cfset"], 10 | ["text"," "], 11 | ["entity.other.attribute-name","welcome"], 12 | ["keyword.operator","="], 13 | ["string","\"Hello World!\""], 14 | ["meta.tag.r",">"] 15 | ],[ 16 | "start" 17 | ],[ 18 | "start", 19 | ["meta.tag","<"], 20 | ["meta.tag.tag-name","cfoutput"], 21 | ["meta.tag.r",">"], 22 | ["text","#welcome#"], 23 | ["meta.tag",""] 26 | ]] -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ######################## 2 | # sails 3 | ######################## 4 | .sails 5 | .waterline 6 | .rigging 7 | .tmp 8 | 9 | 10 | ######################## 11 | # node.js / npm 12 | ######################## 13 | lib-cov 14 | *.seed 15 | *.log 16 | *.csv 17 | *.dat 18 | *.out 19 | *.pid 20 | *.gz 21 | 22 | pids 23 | logs 24 | results 25 | 26 | node_modules 27 | 28 | npm-debug.log 29 | 30 | 31 | ######################## 32 | # misc / editors 33 | ######################## 34 | *~ 35 | *# 36 | .DS_STORE 37 | .netbeans 38 | nbproject 39 | .idea 40 | .sublime-project 41 | .sublime-workspace 42 | 43 | 44 | ######################## 45 | # local config 46 | ######################## 47 | config/local.js 48 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_lucene.txt: -------------------------------------------------------------------------------- 1 | test: recognises AND as keyword 2 | test: recognises OR as keyword 3 | test: recognises NOT as keyword 4 | test: recognises "hello this is dog" as string 5 | test: recognises -"hello this is dog" as negation with string 6 | test: recognises ~100 as text with proximity 7 | test: recognises "hello this is dog"~100 as string with proximity 8 | test: recognises raw:"hello this is dog" as keyword 9 | test: recognises raw:foo as"keyword' 10 | test: recognises "(" as opening parenthesis 11 | test: recognises ")" as closing parenthesis 12 | test: recognises foo* as text with asterisk 13 | test: recognises foo? as text with interro 14 | test: recognises single word as text 15 | foo 16 | -------------------------------------------------------------------------------- /public/js/ace/lib/fixoldbrowsers.js: -------------------------------------------------------------------------------- 1 | // vim:set ts=4 sts=4 sw=4 st: 2 | // -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License 3 | // -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project) 4 | // -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified 5 | // -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License 6 | // -- Irakli Gozalishvili Copyright (C) 2010 MIT License 7 | 8 | /*! 9 | Copyright (c) 2009, 280 North Inc. http://280north.com/ 10 | MIT License. http://github.com/280north/narwhal/blob/master/README.md 11 | */ 12 | 13 | define(function(require, exports, module) { 14 | "use strict"; 15 | 16 | require("./regexp"); 17 | require("./es5-shim"); 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /public/js/ace/mode/luapage.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var HtmlMode = require("./html").Mode; 6 | var LuaMode = require("./lua").Mode; 7 | var Tokenizer = require("../tokenizer").Tokenizer; 8 | var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules; 9 | 10 | var Mode = function() { 11 | var highlighter = new LuaPageHighlightRules(); 12 | 13 | this.$tokenizer = new Tokenizer(new LuaPageHighlightRules().getRules()); 14 | this.$embeds = highlighter.getEmbeds(); 15 | this.createModeDelegates({ 16 | "lua-": LuaMode 17 | }); 18 | }; 19 | oop.inherits(Mode, HtmlMode); 20 | 21 | exports.Mode = Mode; 22 | }); -------------------------------------------------------------------------------- /public/js/ace/mode/latex.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextMode = require("./text").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules; 8 | var LatexFoldMode = require("./folding/latex").FoldMode; 9 | var Range = require("../range").Range; 10 | 11 | var Mode = function() { 12 | this.$tokenizer = new Tokenizer(new LatexHighlightRules().getRules()); 13 | this.foldingRules = new LatexFoldMode(); 14 | }; 15 | oop.inherits(Mode, TextMode); 16 | 17 | (function() { 18 | this.lineCommentStart = "%"; 19 | 20 | }).call(Mode.prototype); 21 | 22 | exports.Mode = Mode; 23 | 24 | }); 25 | -------------------------------------------------------------------------------- /config/application.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | // Name of the application (used as default ) 4 | appName: "Cite", 5 | 6 | // Port this Sails application will live on 7 | port: 1337, 8 | 9 | // The environment the app is deployed in 10 | // (`development` or `production`) 11 | // 12 | // In `production` mode, all css and js are bundled up and minified 13 | // And your views and templates are cached in-memory. Gzip is also used. 14 | // The downside? Harder to debug, and the server takes longer to start. 15 | environment: 'development', 16 | 17 | // Logger 18 | // Valid `level` configs: 19 | // 20 | // - error 21 | // - warn 22 | // - debug 23 | // - info 24 | // - verbose 25 | // 26 | log: { 27 | level: 'info' 28 | } 29 | 30 | }; -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_csharp.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["keyword","public"], 4 | ["text"," "], 5 | ["keyword","void"], 6 | ["text"," "], 7 | ["identifier","HelloWorld"], 8 | ["paren.lparen","("], 9 | ["paren.rparen",")"], 10 | ["text"," "], 11 | ["paren.lparen","{"] 12 | ],[ 13 | "start", 14 | ["text"," "], 15 | ["comment","//Say Hello!"] 16 | ],[ 17 | "start", 18 | ["text"," "], 19 | ["identifier","Console"], 20 | ["punctuation.operator","."], 21 | ["identifier","WriteLine"], 22 | ["paren.lparen","("], 23 | ["string.start","\""], 24 | ["string","Hello World"], 25 | ["string.end","\""], 26 | ["paren.rparen",")"], 27 | ["punctuation.operator",";"] 28 | ],[ 29 | "start", 30 | ["paren.rparen","}"] 31 | ]] -------------------------------------------------------------------------------- /public/js/ace/mode/groovy.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var JavaScriptMode = require("./javascript").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules; 8 | 9 | var Mode = function() { 10 | JavaScriptMode.call(this); 11 | var highlighter = new GroovyHighlightRules(); 12 | this.$tokenizer = new Tokenizer(highlighter.getRules()); 13 | this.$keywordList = highlighter.$keywordList; 14 | }; 15 | oop.inherits(Mode, JavaScriptMode); 16 | 17 | (function() { 18 | 19 | this.createWorker = function(session) { 20 | return null; 21 | }; 22 | 23 | }).call(Mode.prototype); 24 | 25 | exports.Mode = Mode; 26 | }); 27 | -------------------------------------------------------------------------------- /public/js/ace/mode/java.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var JavaScriptMode = require("./javascript").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; 8 | 9 | var Mode = function() { 10 | JavaScriptMode.call(this); 11 | var highlighter = new JavaHighlightRules(); 12 | 13 | this.$tokenizer = new Tokenizer(highlighter.getRules()); 14 | this.$keywordList = highlighter.$keywordList; 15 | }; 16 | oop.inherits(Mode, JavaScriptMode); 17 | 18 | (function() { 19 | 20 | this.createWorker = function(session) { 21 | return null; 22 | }; 23 | 24 | }).call(Mode.prototype); 25 | 26 | exports.Mode = Mode; 27 | }); 28 | -------------------------------------------------------------------------------- /public/js/ace/mode/scala.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var JavaScriptMode = require("./javascript").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules; 8 | 9 | var Mode = function() { 10 | JavaScriptMode.call(this); 11 | 12 | var highlighter = new ScalaHighlightRules(); 13 | this.$tokenizer = new Tokenizer(highlighter.getRules()); 14 | this.$keywordList = highlighter.$keywordList; 15 | }; 16 | oop.inherits(Mode, JavaScriptMode); 17 | 18 | (function() { 19 | 20 | this.createWorker = function(session) { 21 | return null; 22 | }; 23 | 24 | }).call(Mode.prototype); 25 | 26 | exports.Mode = Mode; 27 | }); 28 | -------------------------------------------------------------------------------- /views/main/index.ejs: -------------------------------------------------------------------------------- 1 | <h1>Cite</h1> 2 | <div> 3 | <h3>Login</h3> 4 | <input type="text" id="loginName" placeholder="name" /> 5 | <input type="password" id="loginPassword" placeholder="password" /> 6 | <button id="loginButton">Login</button> 7 | </div> 8 | <div> 9 | <h3>Signup</h3> 10 | <input type="text" id="signupName" placeholder="name" /> 11 | <input type="password" id="signupPassword" placeholder="password" /> 12 | <input type="password" id="signupConfirmPassword" placeholder="confirm password" /> 13 | <button id="signupButton">Signup</button> 14 | </div> 15 | <div> 16 | <h3>Users</h3> 17 | <ul> 18 | <% _.each(users, function(user) { %> 19 | <li><%= user.username %></li> 20 | <% }) %> 21 | </ul> 22 | </div> 23 | <div id="editor"></div> -------------------------------------------------------------------------------- /assets/mixins/reset.css: -------------------------------------------------------------------------------- 1 | /* 2 | * The purpose of this CSS reset file is to a provide a sane starting place for stylesheet development by 3 | * normalizing browser differences, eliminating margin and padding, and providing a clear-fix. 4 | */ 5 | html, body {text-align:left;font-size: 1em;} 6 | html,body,img,form,textarea,input,fieldset,div,p,div,ul,li,ol,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,code { margin: 0;padding: 0;} 7 | ul,li {list-style: none;} 8 | img {display: block;} 9 | a img{border:none;} 10 | a {text-decoration:none;font-weight: normal;font-family: inherit;} 11 | *:active,*:focus { /* Clear mozilla/ie dotted line around active links */ 12 | outline: none; 13 | -moz-outline-style: none; 14 | } 15 | h1,h2,h3,h4,h5,h6,h7 {font-weight: normal; font-size:1em;} /* Fix heading font styles and size */ 16 | div.clear {clear:both;} -------------------------------------------------------------------------------- /public/js/ace/ext/themelist_utils/themes.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | 3 | module.exports.themes = [ 4 | "ambiance", 5 | "chaos", 6 | "chrome", 7 | "clouds", 8 | "clouds_midnight", 9 | "cobalt", 10 | "crimson_editor", 11 | "dawn", 12 | "dreamweaver", 13 | "eclipse", 14 | "github", 15 | "idle_fingers", 16 | "kr_theme", 17 | "merbivore", 18 | "merbivore_soft", 19 | "monokai", 20 | "mono_industrial", 21 | "pastel_on_dark", 22 | "solarized_dark", 23 | "solarized_light", 24 | "terminal", 25 | "textmate", 26 | "tomorrow", 27 | "tomorrow_night", 28 | "tomorrow_night_blue", 29 | "tomorrow_night_bright", 30 | "tomorrow_night_eighties", 31 | "twilight", 32 | "vibrant_ink", 33 | "xcode" 34 | ]; 35 | 36 | }); -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_ruby.txt: -------------------------------------------------------------------------------- 1 | #test: symbol tokenizer 2 | [:@thing, :$thing, :_thing, :thing, :Thing, :thing1, :thing_a, 3 | :THING, :thing!, :thing=, :thing?, :t?, 4 | :, :@, :$, :1, :1thing, :th?ing, :thi=ng, :1thing, 5 | :th!ing, :thing# 6 | ] 7 | 8 | #test: namespaces aren't symbols" : function() { 9 | Namespaced::Class 10 | #test: hex tokenizer 11 | 0x9a, 0XA1, 0x9_a, 0x, 0x_9a, 0x9a_, 12 | #test: float tokenizer 13 | [1, +1, -1, 12_345, 0.000_1, 14 | _, 3_1, 1_2, 1_.0, 0._1]; 15 | 16 | {:id => 34, :key => "value"} 17 | 18 | =begin 19 | =end 20 | 21 | =begin x 22 | =end- 23 | =end x 24 | 25 | herDocs = [<<'FOO', <<BAR, <<-BAZ, <<-`EXEC`] #comment 26 | FOO #{literal} 27 | FOO 28 | BAR #{fact(10)} 29 | BAR 30 | BAZ indented 31 | BAZ 32 | echo hi 33 | EXEC 34 | puts herDocs -------------------------------------------------------------------------------- /public/js/ace/snippets/apache.snippets: -------------------------------------------------------------------------------- 1 | # Snippets for code blocks used oftenly in Apache files. 2 | # <Directory> 3 | snippet dir 4 | <Directory ${1:/}> 5 | DirectoryIndex ${2:index.html} 6 | Order Deny,Allow 7 | Deny from All 8 | </Directory> 9 | # <FilesMatch> 10 | snippet filesmatch 11 | <FilesMatch "${1:regex}"> 12 | ${2} 13 | </FilesMatch> 14 | # <IfModule> 15 | snippet ifmodule 16 | <IfModule ${1:mod_example.c}> 17 | ${2} 18 | </IfModule> 19 | # <LimitExcept> 20 | snippet limitexcept 21 | <LimitExcept ${1:POST GET}> 22 | ${2} 23 | </LimitExcept> 24 | # <Proxy> 25 | snippet proxy 26 | <Proxy ${1:*}> 27 | ${2} 28 | </Proxy> 29 | # <VirtualHost> 30 | snippet virtualhost 31 | <VirtualHost ${1:*}:${2:80}> 32 | ServerAdmin ${3:webmaster@example.com} 33 | DocumentRoot ${4:/www/example.com} 34 | ServerName ${5:www.example.com} 35 | </VirtualHost> 36 | -------------------------------------------------------------------------------- /public/js/ace/snippets/sql.snippets: -------------------------------------------------------------------------------- 1 | snippet tbl 2 | create table ${1:table} ( 3 | ${2:columns} 4 | ); 5 | snippet col 6 | ${1:name} ${2:type} ${3:default ''} ${4:not null} 7 | snippet ccol 8 | ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null} 9 | snippet ncol 10 | ${1:name} number ${3:default 0} ${4:not null} 11 | snippet dcol 12 | ${1:name} date ${3:default sysdate} ${4:not null} 13 | snippet ind 14 | create index ${3:$1_$2} on ${1:table}(${2:column}); 15 | snippet uind 16 | create unique index ${1:name} on ${2:table}(${3:column}); 17 | snippet tblcom 18 | comment on table ${1:table} is '${2:comment}'; 19 | snippet colcom 20 | comment on column ${1:table}.${2:column} is '${3:comment}'; 21 | snippet addcol 22 | alter table ${1:table} add (${2:column} ${3:type}); 23 | snippet seq 24 | create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1}; 25 | snippet s* 26 | select * from ${1:table} 27 | -------------------------------------------------------------------------------- /views/layout.ejs: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <title><%- title %> 5 | 6 | 7 | 8 | 9 | 10 | <%- assets.css() %> 11 | 12 | 13 | 14 | <%- body %> 15 | 16 | 17 | <%- assets.templateLibrary() %> 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /public/js/ace/snippets/mako.snippets: -------------------------------------------------------------------------------- 1 | snippet def 2 | <%def name="${1:name}"> 3 | ${2:} 4 | 5 | snippet call 6 | <%call expr="${1:name}"> 7 | ${2:} 8 | 9 | snippet doc 10 | <%doc> 11 | ${1:} 12 | 13 | snippet text 14 | <%text> 15 | ${1:} 16 | 17 | snippet for 18 | % for ${1:i} in ${2:iter}: 19 | ${3:} 20 | % endfor 21 | snippet if if 22 | % if ${1:condition}: 23 | ${2:} 24 | % endif 25 | snippet if if/else 26 | % if ${1:condition}: 27 | ${2:} 28 | % else: 29 | ${3:} 30 | % endif 31 | snippet try 32 | % try: 33 | ${1:} 34 | % except${2:}: 35 | ${3:pass} 36 | % endtry 37 | snippet wh 38 | % while ${1:}: 39 | ${2:} 40 | % endwhile 41 | snippet $ 42 | ${ ${1:} } 43 | snippet <% 44 | <% ${1:} %> 45 | snippet 47 | snippet inherit 48 | <%inherit file="${1:filename}" /> 49 | snippet include 50 | <%include file="${1:filename}" /> 51 | snippet namespace 52 | <%namespace file="${1:name}" /> 53 | snippet page 54 | <%page args="${1:}" /> 55 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_xquery.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "[\"start\"]", 3 | ["keyword","xquery"], 4 | ["text"," "], 5 | ["keyword","version"], 6 | ["text"," "], 7 | ["string","\""], 8 | ["string","1.0"], 9 | ["string","\""], 10 | ["text",";"] 11 | ],[ 12 | "[\"start\"]" 13 | ],[ 14 | "[\"start\"]", 15 | ["keyword","let"], 16 | ["text"," "], 17 | ["variable","$message"], 18 | ["text"," "], 19 | ["keyword.operator",":="], 20 | ["text"," "], 21 | ["string","\""], 22 | ["string","Hello World!"], 23 | ["string","\""] 24 | ],[ 25 | "[\"start\",\"StartTag\",\"TagContent\"]", 26 | ["keyword","return"], 27 | ["text"," "], 28 | ["meta.tag",""] 30 | ],[ 31 | "[\"start\",\"StartTag\",\"TagContent\"]", 32 | ["text"," "], 33 | ["meta.tag",""], 35 | ["text","{"], 36 | ["variable","$message"], 37 | ["text","}"], 38 | ["meta.tag",""] 39 | ],[ 40 | "[\"start\"]", 41 | ["meta.tag",""] 42 | ],[ 43 | "[\"start\"]" 44 | ]] -------------------------------------------------------------------------------- /public/js/ace/test/tests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ace Unit Tests 7 | 21 | 22 | 23 | 24 |
25 | 26 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_xml.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["meta.tag","<"], 4 | ["meta.tag.tag-name","Juhu"], 5 | ["meta.tag.r",">"], 6 | ["text","//Juhu Kinners"], 7 | ["meta.tag",""] 10 | ],[ 11 | "start", 12 | ["text","test: two tags in the same lines should be in separate tokens\""] 13 | ],[ 14 | "start", 15 | ["meta.tag","<"], 16 | ["meta.tag.tag-name","Juhu"], 17 | ["meta.tag.r",">"], 18 | ["meta.tag","<"], 19 | ["meta.tag.tag-name","Kinners"], 20 | ["meta.tag.r",">"] 21 | ],[ 22 | "start", 23 | ["text","test: multiline attributes\""] 24 | ],[ 25 | "tag_qqstring", 26 | ["meta.tag","<"], 27 | ["meta.tag.tag-name","copy"], 28 | ["text"," "], 29 | ["entity.other.attribute-name","set"], 30 | ["keyword.operator","="], 31 | ["string","\"{"] 32 | ],[ 33 | "tag_qqstring", 34 | ["string","}\""], 35 | ["text"," "], 36 | ["entity.other.attribute-name","undo"], 37 | ["keyword.operator","="], 38 | ["string","\"{"] 39 | ],[ 40 | "start", 41 | ["string","}\""], 42 | ["meta.tag.r","/>"] 43 | ]] -------------------------------------------------------------------------------- /public/js/ace/snippets/cmake.snippets: -------------------------------------------------------------------------------- 1 | snippet cmake 2 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6) 3 | PROJECT(${1:ProjectName}) 4 | 5 | FIND_PACKAGE(${2:LIBRARY}) 6 | 7 | INCLUDE_DIRECTORIES( 8 | ${$2_INCLUDE_DIR} 9 | ) 10 | 11 | ADD_SUBDIRECTORY(${3:src}) 12 | 13 | ADD_EXECUTABLE($1) 14 | 15 | TARGET_LINK_LIBRARIES($1 16 | ${$2_LIBRARIES} 17 | ) 18 | 19 | snippet include 20 | INCLUDE_DIRECTORIES( 21 | ${${1:INCLUDE_DIR}} 22 | ) 23 | 24 | snippet find 25 | FIND_PACKAGE(${1:LIBRARY}) 26 | 27 | snippet glob 28 | FILE(GLOB ${1:SRCS} *.${2:cpp}) 29 | 30 | snippet subdir 31 | ADD_SUBDIRECTORY(${1:src}) 32 | 33 | snippet lib 34 | ADD_LIBRARY(${1:lib} ${2:STATIC} 35 | ${${3:SRCS}} 36 | ) 37 | 38 | snippet link 39 | TARGET_LINK_LIBRARIES(${1:bin} 40 | ${2:somelib} 41 | ) 42 | 43 | snippet bin 44 | ADD_EXECUTABLE(${1:bin}) 45 | 46 | snippet set 47 | SET(${1:var} ${2:val}) 48 | 49 | snippet dep 50 | ADD_DEPENDENCIES(${1:target} 51 | ${2:dep} 52 | ) 53 | 54 | snippet props 55 | SET_TARGET_PROPERTIES(${1:target} 56 | ${2:PROPERTIES} ${3:COMPILE_FLAGS} 57 | ${4:"-O3 -Wall -pedantic"} 58 | ) 59 | -------------------------------------------------------------------------------- /public/js/ace/snippets/htmltornado.snippets: -------------------------------------------------------------------------------- 1 | # Generic tags 2 | 3 | snippet { 4 | {{ ${1} }} 5 | 6 | # Template tags 7 | 8 | snippet extends 9 | {% extends "${1:base.html}" %} 10 | snippet autoescape 11 | {% autoescape ${1:xhtml_escape | None} %} 12 | snippet apply 13 | {% apply ${1:function} %} 14 | ${2} 15 | {% end %} 16 | snippet block 17 | {% block ${1} %} 18 | ${2} 19 | {% end %} 20 | snippet for 21 | {% for ${1:item} in ${2} %} 22 | ${3} 23 | {% end %} 24 | snippet from 25 | {% from ${1:x} import ${2:y} %} 26 | snippet if 27 | {% if ${1:condition} %} 28 | ${2} 29 | {% end %} 30 | snippet elif 31 | {% elif ${1:condition} %} 32 | snippet else 33 | {% else %} 34 | snippet import 35 | {% import ${1:module} %} 36 | snippet include 37 | {% include "${1:filename}" %} 38 | snippet module 39 | {% module ${1:expression} %} 40 | snippet raw 41 | {% raw ${1:expression} %} 42 | snippet set 43 | {% set ${1:x} = ${2:y} %} 44 | snippet try 45 | {% try %} 46 | ${1} 47 | {% except %} 48 | ${2} 49 | {% finallly %} 50 | ${3} 51 | {% end %} 52 | snippet while 53 | {% while ${1:condition} %} 54 | ${2} 55 | {% end %} 56 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_jsx.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "comment", 3 | ["comment","/*EXPECTED"] 4 | ],[ 5 | "comment", 6 | ["comment","hello world!"] 7 | ],[ 8 | "start", 9 | ["comment","*/"] 10 | ],[ 11 | "start", 12 | ["keyword","class"], 13 | ["text"," "], 14 | ["language.support.class","Test"], 15 | ["text"," "], 16 | ["paren.lparen","{"] 17 | ],[ 18 | "start", 19 | ["text"," "], 20 | ["keyword","static"], 21 | ["text"," "], 22 | ["storage.type","function"], 23 | ["text"," "], 24 | ["entity.name.function","run"], 25 | ["paren.lparen","("], 26 | ["paren.rparen",")"], 27 | ["text"," "], 28 | ["punctuation.operator",":"], 29 | ["text"," "], 30 | ["keyword","void"], 31 | ["text"," "], 32 | ["paren.lparen","{"] 33 | ],[ 34 | "start", 35 | ["text"," "], 36 | ["comment","// console.log(\"hello world!\");"] 37 | ],[ 38 | "start", 39 | ["text"," "], 40 | ["keyword","log"], 41 | ["text"," "], 42 | ["string","\"hello world!\""], 43 | ["punctuation.operator",";"] 44 | ],[ 45 | "start", 46 | ["text"," "], 47 | ["paren.rparen","}"] 48 | ],[ 49 | "start", 50 | ["paren.rparen","}"] 51 | ]] -------------------------------------------------------------------------------- /public/js/ace/worker/mirror.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var Document = require("../document").Document; 5 | var lang = require("../lib/lang"); 6 | 7 | var Mirror = exports.Mirror = function(sender) { 8 | this.sender = sender; 9 | var doc = this.doc = new Document(""); 10 | 11 | var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this)); 12 | 13 | var _self = this; 14 | sender.on("change", function(e) { 15 | doc.applyDeltas(e.data); 16 | deferredUpdate.schedule(_self.$timeout); 17 | }); 18 | }; 19 | 20 | (function() { 21 | 22 | this.$timeout = 500; 23 | 24 | this.setTimeout = function(timeout) { 25 | this.$timeout = timeout; 26 | }; 27 | 28 | this.setValue = function(value) { 29 | this.doc.setValue(value); 30 | this.deferredUpdate.schedule(this.$timeout); 31 | }; 32 | 33 | this.getValue = function(callbackId) { 34 | this.sender.callback(this.doc.getValue(), callbackId); 35 | }; 36 | 37 | this.onUpdate = function() { 38 | // abstract method 39 | }; 40 | 41 | }).call(Mirror.prototype); 42 | 43 | }); 44 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_sql.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["keyword","SELECT"], 4 | ["text"," "], 5 | ["identifier","city"], 6 | ["text",", "], 7 | ["support.function","COUNT"], 8 | ["paren.lparen","("], 9 | ["identifier","id"], 10 | ["paren.rparen",")"], 11 | ["text"," "], 12 | ["keyword","AS"], 13 | ["text"," "], 14 | ["identifier","users_count"] 15 | ],[ 16 | "start", 17 | ["keyword","FROM"], 18 | ["text"," "], 19 | ["identifier","users"] 20 | ],[ 21 | "start", 22 | ["keyword","WHERE"], 23 | ["text"," "], 24 | ["identifier","group_name"], 25 | ["text"," "], 26 | ["keyword.operator","="], 27 | ["text"," "], 28 | ["string","'salesman'"] 29 | ],[ 30 | "start", 31 | ["keyword","AND"], 32 | ["text"," "], 33 | ["identifier","created"], 34 | ["text"," "], 35 | ["keyword.operator",">"], 36 | ["text"," "], 37 | ["string","'2011-05-21'"] 38 | ],[ 39 | "start", 40 | ["keyword","GROUP"], 41 | ["text"," "], 42 | ["keyword","BY"], 43 | ["text"," "], 44 | ["constant.numeric","1"] 45 | ],[ 46 | "start", 47 | ["keyword","ORDER"], 48 | ["text"," "], 49 | ["keyword","BY"], 50 | ["text"," "], 51 | ["constant.numeric","2"], 52 | ["text"," "], 53 | ["keyword","DESC"] 54 | ]] -------------------------------------------------------------------------------- /public/js/ace/mode/latex_highlight_rules.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 6 | 7 | var LatexHighlightRules = function() { 8 | this.$rules = { 9 | "start" : [{ 10 | // A tex command e.g. \foo 11 | token : "keyword", 12 | regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" 13 | }, { 14 | // Curly and square braces 15 | token : "lparen", 16 | regex : "[[({]" 17 | }, { 18 | // Curly and square braces 19 | token : "rparen", 20 | regex : "[\\])}]" 21 | }, { 22 | // Inline math between two $ symbols 23 | token : "string", 24 | regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$" 25 | }, { 26 | // A comment. Tex comments start with % and go to 27 | // the end of the line 28 | token : "comment", 29 | regex : "%.*$" 30 | }] 31 | }; 32 | }; 33 | 34 | oop.inherits(LatexHighlightRules, TextHighlightRules); 35 | 36 | exports.LatexHighlightRules = LatexHighlightRules; 37 | 38 | }); 39 | -------------------------------------------------------------------------------- /config/adapters.js: -------------------------------------------------------------------------------- 1 | // Configure installed adapters 2 | // If you define an attribute in your model definition, 3 | // it will override anything from this global config. 4 | module.exports.adapters = { 5 | 6 | // If you leave the adapter config unspecified 7 | // in a model definition, 'default' will be used. 8 | 'default': 'disk', 9 | 10 | // In-memory adapter for DEVELOPMENT ONLY 11 | // (data is NOT preserved when the server shuts down) 12 | memory: { 13 | module: 'sails-dirty', 14 | inMemory: true 15 | }, 16 | 17 | // Persistent adapter for DEVELOPMENT ONLY 18 | // (data IS preserved when the server shuts down) 19 | // PLEASE NOTE: disk adapter not compatible with node v0.10.0 currently 20 | // because of limitations in node-dirty 21 | // See https://github.com/felixge/node-dirty/issues/34 22 | disk: { 23 | module: 'sails-dirty', 24 | filePath: './.tmp/dirty.db', 25 | inMemory: false 26 | }, 27 | 28 | // MySQL is the world's most popular relational database. 29 | // Learn more: http://en.wikipedia.org/wiki/MySQL 30 | mysql: { 31 | module : 'sails-mysql', 32 | host : 'YOUR_MYSQL_SERVER_HOSTNAME_OR_IP_ADDRESS', 33 | cite : 'YOUR_MYSQL_cite', 34 | password : 'YOUR_MYSQL_PASSWORD', 35 | database : 'YOUR_MYSQL_DB' 36 | } 37 | }; -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_html.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["meta.tag","<"], 4 | ["meta.tag.tag-name","html"], 5 | ["meta.tag.r",">"] 6 | ],[ 7 | "start", 8 | ["meta.tag","<"], 9 | ["meta.tag.tag-name.script","script"], 10 | ["text"," "], 11 | ["entity.other.attribute-name","a"], 12 | ["keyword.operator","="], 13 | ["string","'a'"], 14 | ["meta.tag.r",">"], 15 | ["storage.type","var"], 16 | ["meta.tag",""], 19 | ["text","'123'"] 20 | ],[ 21 | "tag_qqstring", 22 | ["meta.tag","<"], 23 | ["meta.tag.tag-name.anchor","a"], 24 | ["text"," "], 25 | ["entity.other.attribute-name","href"], 26 | ["keyword.operator","="], 27 | ["string","\"abc"] 28 | ],[ 29 | "start", 30 | ["string"," def\""], 31 | ["meta.tag.r",">"] 32 | ],[ 33 | "tag_qstring", 34 | ["meta.tag","<"], 35 | ["meta.tag.tag-name.anchor","a"], 36 | ["text"," "], 37 | ["entity.other.attribute-name","href"], 38 | ["keyword.operator","="], 39 | ["string","'abc"] 40 | ],[ 41 | "start", 42 | ["string","def\\'"], 43 | ["meta.tag.r",">"] 44 | ],[ 45 | "start" 46 | ],[ 47 | "start", 48 | ["meta.tag",""] 51 | ]] -------------------------------------------------------------------------------- /public/js/ace/ext/menu_tools/settings_menu.css: -------------------------------------------------------------------------------- 1 | #ace_settingsmenu, #kbshortcutmenu { 2 | background-color: #F7F7F7; 3 | color: black; 4 | box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55); 5 | padding: 1em 0.5em 2em 1em; 6 | overflow: auto; 7 | position: absolute; 8 | margin: 0; 9 | bottom: 0; 10 | right: 0; 11 | top: 0; 12 | z-index: 9991; 13 | cursor: default; 14 | } 15 | 16 | .ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu { 17 | box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25); 18 | background-color: rgba(255, 255, 255, 0.6); 19 | color: black; 20 | } 21 | 22 | .ace_optionsMenuEntry:hover { 23 | background-color: rgba(100, 100, 100, 0.1); 24 | -webkit-transition: all 0.5s; 25 | transition: all 0.3s 26 | } 27 | 28 | .ace_closeButton { 29 | background: rgba(245, 146, 146, 0.5); 30 | border: 1px solid #F48A8A; 31 | border-radius: 50%; 32 | padding: 7px; 33 | position: absolute; 34 | right: -8px; 35 | top: -8px; 36 | z-index: 1000; 37 | } 38 | .ace_closeButton{ 39 | background: rgba(245, 146, 146, 0.9); 40 | } 41 | .ace_optionsMenuKey { 42 | color: darkslateblue; 43 | font-weight: bold; 44 | } 45 | .ace_optionsMenuCommand { 46 | color: darkcyan; 47 | font-weight: normal; 48 | } -------------------------------------------------------------------------------- /public/js/ace/snippets/falcon.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env falcon 3 | 4 | # Import 5 | snippet imp 6 | import ${1:module} 7 | 8 | # Function 9 | snippet fun 10 | function ${2:function_name}(${3}) 11 | ${4:/* code */} 12 | end 13 | 14 | # Class 15 | snippet class 16 | class ${1:class_name}(${2:class_params}) 17 | ${3:/* members/methods */} 18 | end 19 | 20 | # If 21 | snippet if 22 | if ${1:condition} 23 | ${2:/* code */} 24 | end 25 | 26 | # If else 27 | snippet ife 28 | if ${1:condition} 29 | ${2:/* code */} 30 | else 31 | ${1} 32 | end 33 | 34 | # If else if 35 | snippet elif 36 | elif ${1:condition} 37 | ${2:/* code */} 38 | 39 | # Switch case 40 | snippet switch 41 | switch ${1:expression} 42 | case ${2:item} 43 | case ${3:item} 44 | default 45 | end 46 | 47 | # Select 48 | snippet select 49 | select ${1:variable} 50 | case ${2:TypeSpec} 51 | case ${3:TypeSpec} 52 | default 53 | end 54 | 55 | # For/in Loop 56 | snippet forin 57 | for ${1:element} in ${2:container} 58 | ${3:/* code */} 59 | end 60 | 61 | # For/to Loop 62 | snippet forto 63 | for ${1:lowerbound} to ${2:upperbound} 64 | ${3:/* code */} 65 | end 66 | 67 | # While Loop 68 | snippet while 69 | while ${1:conidition} 70 | ${2:/* code */} 71 | end 72 | -------------------------------------------------------------------------------- /public/js/ace/lib/net.js: -------------------------------------------------------------------------------- 1 | /* 2 | * based on code from: 3 | * 4 | * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. 5 | * Available via the MIT or new BSD license. 6 | * see: http://github.com/jrburke/requirejs for details 7 | */ 8 | define(function(require, exports, module) { 9 | "use strict"; 10 | var dom = require("./dom"); 11 | 12 | exports.get = function (url, callback) { 13 | var xhr = new XMLHttpRequest(); 14 | xhr.open('GET', url, true); 15 | xhr.onreadystatechange = function () { 16 | //Do not explicitly handle errors, those should be 17 | //visible via console output in the browser. 18 | if (xhr.readyState === 4) { 19 | callback(xhr.responseText); 20 | } 21 | }; 22 | xhr.send(null); 23 | }; 24 | 25 | exports.loadScript = function(path, callback) { 26 | var head = dom.getDocumentHead(); 27 | var s = document.createElement('script'); 28 | 29 | s.src = path; 30 | head.appendChild(s); 31 | 32 | s.onload = s.onreadystatechange = function(_, isAbort) { 33 | if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { 34 | s = s.onload = s.onreadystatechange = null; 35 | if (!isAbort) 36 | callback(); 37 | } 38 | }; 39 | }; 40 | 41 | }); 42 | -------------------------------------------------------------------------------- /public/js/ace/mode/luapage_highlight_rules.js: -------------------------------------------------------------------------------- 1 | // LuaPage implements the LuaPage markup as described by the Kepler Project's CGILua 2 | // documentation: http://keplerproject.github.com/cgilua/manual.html#templates 3 | define(function(require, exports, module) { 4 | "use strict"; 5 | 6 | var oop = require("../lib/oop"); 7 | var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; 8 | var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; 9 | 10 | var LuaPageHighlightRules = function() { 11 | this.$rules = new HtmlHighlightRules().getRules(); 12 | 13 | for (var i in this.$rules) { 14 | this.$rules[i].unshift({ 15 | token: "keyword", 16 | regex: "<\\%\\=?", 17 | next: "lua-start" 18 | }, { 19 | token: "keyword", 20 | regex: "<\\?lua\\=?", 21 | next: "lua-start" 22 | }); 23 | } 24 | this.embedRules(LuaHighlightRules, "lua-", [ 25 | { 26 | token: "keyword", 27 | regex: "\\%>", 28 | next: "start" 29 | }, 30 | { 31 | token: "keyword", 32 | regex: "\\?>", 33 | next: "start" 34 | } 35 | ]); 36 | }; 37 | 38 | oop.inherits(LuaPageHighlightRules, HtmlHighlightRules); 39 | 40 | exports.LuaPageHighlightRules = LuaPageHighlightRules; 41 | 42 | }); -------------------------------------------------------------------------------- /public/js/ace/mode/rdoc.js: -------------------------------------------------------------------------------- 1 | /* 2 | * rdoc.js 3 | * 4 | * Copyright (C) 2009-11 by RStudio, Inc. 5 | * 6 | * This program is licensed to you under the terms of version 3 of the 7 | * GNU Affero General Public License. This program is distributed WITHOUT 8 | * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, 9 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the 10 | * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. 11 | * 12 | */ 13 | define(function(require, exports, module) { 14 | "use strict"; 15 | 16 | var oop = require("../lib/oop"); 17 | var TextMode = require("./text").Mode; 18 | var Tokenizer = require("../tokenizer").Tokenizer; 19 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 20 | var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules; 21 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 22 | 23 | var Mode = function(suppressHighlighting) { 24 | this.$tokenizer = new Tokenizer(new RDocHighlightRules().getRules()); 25 | this.$outdent = new MatchingBraceOutdent(); 26 | }; 27 | oop.inherits(Mode, TextMode); 28 | 29 | (function() { 30 | this.getNextLineIndent = function(state, line, tab) { 31 | return this.$getIndent(line); 32 | }; 33 | }).call(Mode.prototype); 34 | 35 | exports.Mode = Mode; 36 | }); 37 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_curly.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["text","tokenize Curly template"], 4 | ["variable","{{"], 5 | ["text","test"], 6 | ["variable","}}"] 7 | ],[ 8 | "start", 9 | ["text","tokenize embedded script"] 10 | ],[ 11 | "start", 12 | ["meta.tag","<"], 13 | ["meta.tag.tag-name.script","script"], 14 | ["text"," "], 15 | ["entity.other.attribute-name","a"], 16 | ["keyword.operator","="], 17 | ["string","'a'"], 18 | ["meta.tag.r",">"], 19 | ["storage.type","var"], 20 | ["meta.tag",""], 23 | ["text","'123'"] 24 | ],[ 25 | "start", 26 | ["text","tokenize multiline attribute value with double quotes"] 27 | ],[ 28 | "tag_qqstring", 29 | ["meta.tag","<"], 30 | ["meta.tag.tag-name.anchor","a"], 31 | ["text"," "], 32 | ["entity.other.attribute-name","href"], 33 | ["keyword.operator","="], 34 | ["string","\"abc{{xyz}}"] 35 | ],[ 36 | "start", 37 | ["string","def\""], 38 | ["meta.tag.r",">"] 39 | ],[ 40 | "start", 41 | ["text","tokenize multiline attribute value with single quotes"] 42 | ],[ 43 | "tag_qstring", 44 | ["meta.tag","<"], 45 | ["meta.tag.tag-name.anchor","a"], 46 | ["text"," "], 47 | ["entity.other.attribute-name","href"], 48 | ["keyword.operator","="], 49 | ["string","'abc"] 50 | ],[ 51 | "start", 52 | ["string","def\\\"'"], 53 | ["meta.tag.r",">"] 54 | ],[ 55 | "start" 56 | ]] -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_coffee.txt: -------------------------------------------------------------------------------- 1 | #test: tokenize keyword 2 | for (i 1..2) 3 | #test: tokenize regexp 4 | /"[a]/ 5 | #test: tokenize functions 6 | foo = ({args}) -> 7 | foo = ({a1, a2}) -> 8 | foo = ({@a1, a2}) -> 9 | foo : ({args}) -> 10 | foo = ({args}) -> 11 | foo = ({0abc}) -> 12 | foo = ({/abc}) => 13 | foo = ({abc/}) -> 14 | foo = ({#abc}) -> 15 | foo = ({abc#}) -> 16 | foo = ({)abc}) -> 17 | foo = ({abc)}) -> 18 | foo = ({a{bc}) -> 19 | foo = ({}) -> 20 | foo = ({ }) -> 21 | foo : ({}) -> 22 | foo = (args) -> 23 | foo = (arg1, arg2) -> 24 | foo = (arg1 = 1, arg2 = 'name') -> 25 | foo = (@arg1 = /abc/, arg2 = 'name') -> 26 | #test: tokenize function: invalid case: 27 | foo=(/args) -> 28 | foo = () -> 29 | foo = ( ) -> 30 | foo : ( ) -> 31 | window.foo = (args) -> 32 | foo = -> 33 | foo = -> 34 | foo : -> 35 | #test: tokenize callback function 36 | foo bar: 1, (args) -> 37 | foo = (1, 2 (x) -> 38 | #test: tokenize class 39 | class Foo 40 | class Foo extends Bar 41 | #test: tokenize illegal name property 42 | foo.static.function 43 | #!test tokenize string with interpolation 44 | a = "#{ 22 / 7 + {x: "#{a + b}"} + 2}" 45 | """heredoc 46 | """ 47 | do -> 48 | ### 49 | herecomment 50 | ### 51 | re = /regex/imgy.test /// 52 | heregex # comment 53 | ///imgy 54 | this isnt: `just 55 | JavaScript` 56 | undefined 57 | -------------------------------------------------------------------------------- /public/js/ace/snippets/autoit.snippets: -------------------------------------------------------------------------------- 1 | snippet if 2 | If ${1:condition} Then 3 | ${2:; True code} 4 | EndIf 5 | snippet el 6 | Else 7 | ${1} 8 | snippet elif 9 | ElseIf ${1:condition} Then 10 | ${2:; True code} 11 | # If/Else block 12 | snippet ifel 13 | If ${1:condition} Then 14 | ${2:; True code} 15 | Else 16 | ${3:; Else code} 17 | EndIf 18 | # If/ElseIf/Else block 19 | snippet ifelif 20 | If ${1:condition 1} Then 21 | ${2:; True code} 22 | ElseIf ${3:condition 2} Then 23 | ${4:; True code} 24 | Else 25 | ${5:; Else code} 26 | EndIf 27 | # Switch block 28 | snippet switch 29 | Switch (${1:condition}) 30 | Case {$2:case1}: 31 | {$3:; Case 1 code} 32 | Case Else: 33 | {$4:; Else code} 34 | EndSwitch 35 | # Select block 36 | snippet select 37 | Select (${1:condition}) 38 | Case {$2:case1}: 39 | {$3:; Case 1 code} 40 | Case Else: 41 | {$4:; Else code} 42 | EndSelect 43 | # While loop 44 | snippet while 45 | While (${1:condition}) 46 | ${2:; code...} 47 | WEnd 48 | # For loop 49 | snippet for 50 | For ${1:n} = ${3:1} to ${2:count} 51 | ${4:; code...} 52 | Next 53 | # New Function 54 | snippet func 55 | Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): 56 | ${4:Return} 57 | EndFunc 58 | # Message box 59 | snippet msg 60 | MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) 61 | # Debug Message 62 | snippet debug 63 | MsgBox(0, "Debug", ${1:"Debug Message"}) 64 | # Show Variable Debug Message 65 | snippet showvar 66 | MsgBox(0, "${1:VarName}", $1) 67 | -------------------------------------------------------------------------------- /public/js/ace/snippets/dart.snippets: -------------------------------------------------------------------------------- 1 | snippet lib 2 | #library('${1}'); 3 | ${2} 4 | snippet im 5 | #import('${1}'); 6 | ${2} 7 | snippet so 8 | #source('${1}'); 9 | ${2} 10 | snippet main 11 | static void main() { 12 | ${1:/* code */} 13 | } 14 | snippet st 15 | static ${1} 16 | snippet fi 17 | final ${1} 18 | snippet re 19 | return ${1} 20 | snippet br 21 | break; 22 | snippet th 23 | throw ${1} 24 | snippet cl 25 | class ${1:`Filename("", "untitled")`} ${2} 26 | snippet in 27 | interface ${1:`Filename("", "untitled")`} ${2} 28 | snippet imp 29 | implements ${1} 30 | snippet ext 31 | extends ${1} 32 | snippet if 33 | if (${1:true}) { 34 | ${2} 35 | } 36 | snippet ife 37 | if (${1:true}) { 38 | ${2} 39 | } else { 40 | ${3} 41 | } 42 | snippet el 43 | else 44 | snippet sw 45 | switch (${1}) { 46 | ${2} 47 | } 48 | snippet cs 49 | case ${1}: 50 | ${2} 51 | snippet de 52 | default: 53 | ${1} 54 | snippet for 55 | for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) { 56 | ${4:$1[$2]} 57 | } 58 | snippet fore 59 | for (final ${2:item} in ${1:itemList}) { 60 | ${3:/* code */} 61 | } 62 | snippet wh 63 | while (${1:/* condition */}) { 64 | ${2:/* code */} 65 | } 66 | snippet dowh 67 | do { 68 | ${2:/* code */} 69 | } while (${1:/* condition */}); 70 | snippet as 71 | assert(${1:/* condition */}); 72 | snippet try 73 | try { 74 | ${2} 75 | } catch (${1:Exception e}) { 76 | } 77 | snippet tryf 78 | try { 79 | ${2} 80 | } catch (${1:Exception e}) { 81 | } finally { 82 | } 83 | -------------------------------------------------------------------------------- /api/controllers/MainController.js: -------------------------------------------------------------------------------- 1 | /*--------------------- 2 | :: Main 3 | -> controller 4 | ---------------------*/ 5 | var MainController = { 6 | index: function(req, res) { 7 | User.findAll({}).done(function(err, users) { 8 | if(err) { 9 | res.send(500, {error: "DB Error"}); 10 | } else { 11 | res.view({users: users}); 12 | } 13 | }); 14 | }, 15 | signup: function(req, res) { 16 | var username = req.param("username"), 17 | password = req.param("password"); 18 | 19 | User.findByUsername(username).done(function(err, usr) { 20 | if (err) { 21 | res.send(500, {error: "DB Error"}); 22 | } else if (usr) { 23 | res.send(400, {error: "Username already taken"}); 24 | } else { 25 | var hasher = require("password-hash"); 26 | password = hasher.generate(password); 27 | 28 | User.create({ 29 | username: username, 30 | password: password 31 | }).done(function(err, user) { 32 | if (err) { 33 | res.send(500, {error: "DB Error"}); 34 | } else { 35 | req.session.user = user; 36 | res.send(user); 37 | } 38 | }) 39 | } 40 | }) 41 | }, 42 | login: function(req, res) { 43 | 44 | } 45 | }; 46 | 47 | module.exports = MainController; -------------------------------------------------------------------------------- /public/js/ace/theme/chaos.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright 2011 Irakli Gozalishvili. All rights reserved. 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to 7 | * deal in the Software without restriction, including without limitation the 8 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | * sell copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * ***** END LICENSE BLOCK ***** */ 23 | 24 | define(function(require, exports, module) { 25 | 26 | exports.isDark = true; 27 | exports.cssClass = "ace-chaos"; 28 | exports.cssText = require("../requirejs/text!./chaos.css"); 29 | 30 | var dom = require("../lib/dom"); 31 | dom.importCssString(exports.cssText, exports.cssClass); 32 | 33 | }); -------------------------------------------------------------------------------- /public/js/ace/mode/lucene_highlight_rules.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var lang = require("../lib/lang"); 6 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 7 | 8 | var LuceneHighlightRules = function() { 9 | this.$rules = { 10 | "start" : [ 11 | { 12 | token : "constant.character.negation", 13 | regex : "[\\-]" 14 | }, { 15 | token : "constant.character.interro", 16 | regex : "[\\?]" 17 | }, { 18 | token : "constant.character.asterisk", 19 | regex : "[\\*]" 20 | }, { 21 | token: 'constant.character.proximity', 22 | regex: '~[0-9]+\\b' 23 | }, { 24 | token : 'keyword.operator', 25 | regex: '(?:AND|OR|NOT)\\b' 26 | }, { 27 | token : "paren.lparen", 28 | regex : "[\\(]" 29 | }, { 30 | token : "paren.rparen", 31 | regex : "[\\)]" 32 | }, { 33 | token : "keyword", 34 | regex : "[\\S]+:" 35 | }, { 36 | token : "string", // " string 37 | regex : '".*?"' 38 | }, { 39 | token : "text", 40 | regex : "\\s+" 41 | } 42 | ] 43 | }; 44 | }; 45 | 46 | oop.inherits(LuceneHighlightRules, TextHighlightRules); 47 | 48 | exports.LuceneHighlightRules = LuceneHighlightRules; 49 | }); 50 | -------------------------------------------------------------------------------- /public/js/ace/theme/ambiance.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright 2011 Irakli Gozalishvili. All rights reserved. 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to 7 | * deal in the Software without restriction, including without limitation the 8 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | * sell copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | * IN THE SOFTWARE. 22 | * ***** END LICENSE BLOCK ***** */ 23 | 24 | define(function(require, exports, module) { 25 | 26 | exports.isDark = true; 27 | exports.cssClass = "ace-ambiance"; 28 | exports.cssText = require("../requirejs/text!./ambiance.css"); 29 | 30 | var dom = require("../lib/dom"); 31 | dom.importCssString(exports.cssText, exports.cssClass); 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /public/js/ace/ext/statusbar.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | /** simple statusbar **/ 4 | var dom = require("ace/lib/dom"); 5 | var lang = require("ace/lib/lang"); 6 | 7 | var StatusBar = function(editor, parentNode) { 8 | this.element = dom.createElement("div"); 9 | this.element.className = "ace_status-indicator"; 10 | this.element.style.cssText = "display: inline-block;"; 11 | parentNode.appendChild(this.element); 12 | 13 | var statusUpdate = lang.delayedCall(function(){ 14 | this.updateStatus(editor) 15 | }.bind(this)); 16 | editor.on("changeStatus", function() { 17 | statusUpdate.schedule(100); 18 | }); 19 | editor.on("changeSelection", function() { 20 | statusUpdate.schedule(100); 21 | }); 22 | }; 23 | 24 | (function(){ 25 | this.updateStatus = function(editor) { 26 | var status = []; 27 | function add(str, separator) { 28 | str && status.push(str, separator || "|"); 29 | } 30 | 31 | if (editor.$vimModeHandler) 32 | add(editor.$vimModeHandler.getStatusText()); 33 | else if (editor.commands.recording) 34 | add("REC"); 35 | 36 | var c = editor.selection.lead; 37 | add(c.row + ":" + c.column, " "); 38 | if (!editor.selection.isEmpty()) { 39 | var r = editor.getSelectionRange(); 40 | add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")"); 41 | } 42 | status.pop(); 43 | this.element.textContent = status.join(""); 44 | }; 45 | }).call(StatusBar.prototype); 46 | 47 | exports.StatusBar = StatusBar; 48 | 49 | }); -------------------------------------------------------------------------------- /assets/js/main.js: -------------------------------------------------------------------------------- 1 | ;(function($, ace){ 2 | // Login 3 | $("#loginButton").click(function(){ 4 | var username = $("#loginName").val(); 5 | var password = $("#loginPassword").val(); 6 | if (username && password) { 7 | $.post( 8 | '/login', 9 | {username: username, password:password}, 10 | function () { 11 | window.location = "/user"; 12 | } 13 | ).fail(function(res){ 14 | alert("Error: " + res.getResponseHeader("error")); 15 | }); 16 | } else { 17 | alert("A username and password is required"); 18 | } 19 | }); 20 | 21 | // Signup 22 | $("#signupButton").click(function(){ 23 | var username = $("#signupName").val(); 24 | var password = $("#signupPassword").val(); 25 | var confirmPassword = $("#signupConfirmPassword").val(); 26 | if (username && password) { 27 | if (password === confirmPassword) { 28 | $.post( 29 | '/signup', 30 | {username: username, password:password}, 31 | function () { 32 | window.location = "/user/"; 33 | } 34 | ).fail(function(res){ 35 | alert("Error: " + res.getResponseHeader("error")); 36 | }); 37 | } else { 38 | alert("Passwords don't match"); 39 | } 40 | } else { 41 | alert("A username and password is required"); 42 | } 43 | }); 44 | 45 | 46 | //Editor 47 | var editor = ace.edit("editor"); 48 | })(jQuery, ace); -------------------------------------------------------------------------------- /public/js/ace/mode/tex.js: -------------------------------------------------------------------------------- 1 | /* 2 | * tex.js 3 | * 4 | * Copyright (C) 2009-11 by RStudio, Inc. 5 | * 6 | * The Initial Developer of the Original Code is 7 | * Ajax.org B.V. 8 | * Portions created by the Initial Developer are Copyright (C) 2010 9 | * the Initial Developer. All Rights Reserved. 10 | * 11 | * This program is licensed to you under the terms of version 3 of the 12 | * GNU Affero General Public License. This program is distributed WITHOUT 13 | * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the 15 | * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. 16 | * 17 | */ 18 | define(function(require, exports, module) { 19 | "use strict"; 20 | 21 | var oop = require("../lib/oop"); 22 | var TextMode = require("./text").Mode; 23 | var Tokenizer = require("../tokenizer").Tokenizer; 24 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 25 | var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; 26 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 27 | 28 | var Mode = function(suppressHighlighting) { 29 | if (suppressHighlighting) 30 | this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules()); 31 | else 32 | this.$tokenizer = new Tokenizer(new TexHighlightRules().getRules()); 33 | this.$outdent = new MatchingBraceOutdent(); 34 | }; 35 | oop.inherits(Mode, TextMode); 36 | 37 | (function() { 38 | this.getNextLineIndent = function(state, line, tab) { 39 | return this.$getIndent(line); 40 | }; 41 | 42 | this.allowAutoInsert = function() { 43 | return false; 44 | }; 45 | }).call(Mode.prototype); 46 | 47 | exports.Mode = Mode; 48 | }); 49 | -------------------------------------------------------------------------------- /public/js/ace/test/asyncjs/utils.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * async.js 3 | * Copyright(c) 2010 Fabian Jakobs 4 | * MIT Licensed 5 | */ 6 | 7 | define(function(require, exports, module) { 8 | 9 | var async = require("asyncjs/async") 10 | 11 | async.plugin({ 12 | delay: function(delay) { 13 | return this.each(function(item, next) { 14 | setTimeout(function() { 15 | next(); 16 | }, delay) 17 | }) 18 | }, 19 | 20 | timeout: function(timeout) { 21 | timeout = timeout || 0 22 | var source = this.source 23 | 24 | this.next = function(callback) { 25 | var called 26 | var id = setTimeout(function() { 27 | called = true 28 | callback("Source did not respond after " + timeout + "ms!") 29 | }, timeout) 30 | 31 | source.next(function(err, value) { 32 | if (called) 33 | return 34 | 35 | called = true 36 | clearTimeout(id) 37 | 38 | callback(err, value) 39 | }) 40 | } 41 | return new this.constructor(this) 42 | }, 43 | 44 | get: function(key) { 45 | return this.map(function(value, next) { 46 | next(null, value[key]) 47 | }) 48 | }, 49 | 50 | inspect: function() { 51 | return this.each(function(item, next) { 52 | console.log(JSON.stringify(item)) 53 | next() 54 | }) 55 | }, 56 | 57 | print: function() { 58 | return this.each(function(item, next) { 59 | console.log(item) 60 | next() 61 | }) 62 | } 63 | }) 64 | 65 | }) 66 | -------------------------------------------------------------------------------- /public/js/ace/mode/dot.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextMode = require("./text").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 8 | var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules; 9 | var DotFoldMode = require("./folding/cstyle").FoldMode; 10 | 11 | var Mode = function() { 12 | var highlighter = new DotHighlightRules(); 13 | this.$outdent = new MatchingBraceOutdent(); 14 | this.foldingRules = new DotFoldMode(); 15 | this.$tokenizer = new Tokenizer(highlighter.getRules()); 16 | }; 17 | oop.inherits(Mode, TextMode); 18 | 19 | (function() { 20 | 21 | this.lineCommentStart = ["//", "#"]; 22 | this.blockComment = {start: "/*", end: "*/"}; 23 | 24 | this.getNextLineIndent = function(state, line, tab) { 25 | var indent = this.$getIndent(line); 26 | 27 | var tokenizedLine = this.$tokenizer.getLineTokens(line, state); 28 | var tokens = tokenizedLine.tokens; 29 | var endState = tokenizedLine.state; 30 | 31 | if (tokens.length && tokens[tokens.length-1].type == "comment") { 32 | return indent; 33 | } 34 | 35 | if (state == "start") { 36 | var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); 37 | if (match) { 38 | indent += tab; 39 | } 40 | } 41 | 42 | return indent; 43 | }; 44 | 45 | this.checkOutdent = function(state, line, input) { 46 | return this.$outdent.checkOutdent(line, input); 47 | }; 48 | 49 | this.autoOutdent = function(state, doc, row) { 50 | this.$outdent.autoOutdent(doc, row); 51 | }; 52 | 53 | }).call(Mode.prototype); 54 | 55 | exports.Mode = Mode; 56 | }); 57 | -------------------------------------------------------------------------------- /public/js/ace/mode/jsx.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextMode = require("./text").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules; 8 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 9 | var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; 10 | var CStyleFoldMode = require("./folding/cstyle").FoldMode; 11 | 12 | function Mode() { 13 | this.$tokenizer = new Tokenizer(new JsxHighlightRules().getRules()); 14 | this.$outdent = new MatchingBraceOutdent(); 15 | this.$behaviour = new CstyleBehaviour(); 16 | this.foldingRules = new CStyleFoldMode(); 17 | } 18 | oop.inherits(Mode, TextMode); 19 | 20 | (function() { 21 | 22 | this.lineCommentStart = "//"; 23 | this.blockComment = {start: "/*", end: "*/"}; 24 | 25 | this.getNextLineIndent = function(state, line, tab) { 26 | var indent = this.$getIndent(line); 27 | 28 | var tokenizedLine = this.$tokenizer.getLineTokens(line, state); 29 | var tokens = tokenizedLine.tokens; 30 | 31 | if (tokens.length && tokens[tokens.length-1].type == "comment") { 32 | return indent; 33 | } 34 | 35 | if (state == "start") { 36 | var match = line.match(/^.*[\{\(\[]\s*$/); 37 | if (match) { 38 | indent += tab; 39 | } 40 | } 41 | 42 | return indent; 43 | }; 44 | 45 | this.checkOutdent = function(state, line, input) { 46 | return this.$outdent.checkOutdent(line, input); 47 | }; 48 | 49 | this.autoOutdent = function(state, doc, row) { 50 | this.$outdent.autoOutdent(doc, row); 51 | }; 52 | 53 | }).call(Mode.prototype); 54 | 55 | exports.Mode = Mode; 56 | }); 57 | -------------------------------------------------------------------------------- /public/js/ace/mode/rhtml_highlight_rules.js: -------------------------------------------------------------------------------- 1 | /* 2 | * rhtml_highlight_rules.js 3 | * 4 | * Copyright (C) 2009-11 by RStudio, Inc. 5 | * 6 | * The Initial Developer of the Original Code is 7 | * Ajax.org B.V. 8 | * Portions created by the Initial Developer are Copyright (C) 2010 9 | * the Initial Developer. All Rights Reserved. 10 | * 11 | * This program is licensed to you under the terms of version 3 of the 12 | * GNU Affero General Public License. This program is distributed WITHOUT 13 | * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, 14 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the 15 | * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. 16 | * 17 | */ 18 | define(function(require, exports, module) { 19 | "use strict"; 20 | 21 | var oop = require("../lib/oop"); 22 | var RHighlightRules = require("./r_highlight_rules").RHighlightRules; 23 | var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; 24 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 25 | 26 | var RHtmlHighlightRules = function() { 27 | 28 | // regexp must not have capturing parentheses 29 | // regexps are ordered -> the first match is used 30 | 31 | this.$rules = new HtmlHighlightRules().getRules(); 32 | this.$rules["start"].unshift({ 33 | token: "support.function.codebegin", 34 | regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)", 35 | next: "r-start" 36 | }); 37 | 38 | var rRules = new RHighlightRules().getRules(); 39 | this.addRules(rRules, "r-"); 40 | this.$rules["r-start"].unshift({ 41 | token: "support.function.codeend", 42 | regex: "^\\s*end.rcode\\s*-->", 43 | next: "start" 44 | }); 45 | }; 46 | oop.inherits(RHtmlHighlightRules, TextHighlightRules); 47 | 48 | exports.RHtmlHighlightRules = RHtmlHighlightRules; 49 | }); 50 | -------------------------------------------------------------------------------- /public/js/ace/snippets/tcl.snippets: -------------------------------------------------------------------------------- 1 | # #!/usr/bin/env tclsh 2 | snippet #! 3 | #!/usr/bin/env tclsh 4 | 5 | # Process 6 | snippet pro 7 | proc ${1:function_name} {${2:args}} { 8 | ${3:#body ...} 9 | } 10 | #xif 11 | snippet xif 12 | ${1:expr}? ${2:true} : ${3:false} 13 | # Conditional 14 | snippet if 15 | if {${1}} { 16 | ${2:# body...} 17 | } 18 | # Conditional if..else 19 | snippet ife 20 | if {${1}} { 21 | ${2:# body...} 22 | } else { 23 | ${3:# else...} 24 | } 25 | # Conditional if..elsif..else 26 | snippet ifee 27 | if {${1}} { 28 | ${2:# body...} 29 | } elseif {${3}} { 30 | ${4:# elsif...} 31 | } else { 32 | ${5:# else...} 33 | } 34 | # If catch then 35 | snippet ifc 36 | if { [catch {${1:#do something...}} ${2:err}] } { 37 | ${3:# handle failure...} 38 | } 39 | # Catch 40 | snippet catch 41 | catch {${1}} ${2:err} ${3:options} 42 | # While Loop 43 | snippet wh 44 | while {${1}} { 45 | ${2:# body...} 46 | } 47 | # For Loop 48 | snippet for 49 | for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { 50 | ${4:# body...} 51 | } 52 | # Foreach Loop 53 | snippet fore 54 | foreach ${1:x} {${2:#list}} { 55 | ${3:# body...} 56 | } 57 | # after ms script... 58 | snippet af 59 | after ${1:ms} ${2:#do something} 60 | # after cancel id 61 | snippet afc 62 | after cancel ${1:id or script} 63 | # after idle 64 | snippet afi 65 | after idle ${1:script} 66 | # after info id 67 | snippet afin 68 | after info ${1:id} 69 | # Expr 70 | snippet exp 71 | expr {${1:#expression here}} 72 | # Switch 73 | snippet sw 74 | switch ${1:var} { 75 | ${3:pattern 1} { 76 | ${4:#do something} 77 | } 78 | default { 79 | ${2:#do something} 80 | } 81 | } 82 | # Case 83 | snippet ca 84 | ${1:pattern} { 85 | ${2:#do something} 86 | }${3} 87 | # Namespace eval 88 | snippet ns 89 | namespace eval ${1:path} {${2:#script...}} 90 | # Namespace current 91 | snippet nsc 92 | namespace current 93 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_javascript.txt: -------------------------------------------------------------------------------- 1 | //test: tokenize 'standard' functions 2 | string.charCodeAt(23); document.getElementById('test'); console.log('Here it is');"; 3 | test: /**tokenize doc*/ comment 4 | /**tokenize doc comment with @tag {}*/ 5 | //test: tokenize parens 6 | var line = "[{( )}]"; 7 | //test tokenize arithmetic expression which looks like a regexp 8 | a/b/c 9 | a/=b/c 10 | //test tokenize reg exps 11 | a=/b/g 12 | a+/b/g 13 | a = 1 + /2 + 1/b 14 | a=/a/ / /a/ 15 | case /a/.test(c) 16 | //test tokenize multi-line comment containing a single line comment 17 | noRegex 18 | /* foo // bar */ 19 | canBeRegex; 20 | /* foo // bar */ 21 | // test tokenize identifier with umlauts 22 | fu?e 23 | // test // is not a regexp 24 | { // 123 25 | //test skipping escaped chars 26 | 'Meh\\nNeh' 27 | console.log('\\u1232Feh' 28 | "test multiline\ 29 | strings" 30 | a=' 31 | b="\ 32 | still a string 33 | 34 | 35 | function foo(items, nada) { 36 | for (var i=0; i ${3:a} 43 | $1 ${4} = ${5:undefined} 44 | snippet fn2 45 | ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a} 46 | $1 ${5} = ${6:undefined} 47 | snippet ap 48 | ${1:map} ${2:fn} ${3:list} 49 | snippet do 50 | do 51 | 52 | snippet λ 53 | \${1:x} -> ${2} 54 | snippet \ 55 | \${1:x} -> ${2} 56 | snippet <- 57 | ${1:a} <- ${2:m a} 58 | snippet ← 59 | ${1:a} <- ${2:m a} 60 | snippet -> 61 | ${1:m a} -> ${2:a} 62 | snippet → 63 | ${1:m a} -> ${2:a} 64 | snippet tup 65 | (${1:a}, ${2:b}) 66 | snippet tup2 67 | (${1:a}, ${2:b}, ${3:c}) 68 | snippet tup3 69 | (${1:a}, ${2:b}, ${3:c}, ${4:d}) 70 | snippet rec 71 | ${1:Record} { ${2:recFieldA} = ${3:undefined} 72 | , ${4:recFieldB} = ${5:undefined} 73 | } 74 | snippet case 75 | case ${1:something} of 76 | ${2} -> ${3} 77 | snippet let 78 | let ${1} = ${2} 79 | in ${3} 80 | snippet where 81 | where 82 | ${1:fn} = ${2:undefined} 83 | -------------------------------------------------------------------------------- /public/js/ace/theme/idle_fingers.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-idle-fingers"; 35 | exports.cssText = require("../requirejs/text!./idle_fingers.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/mode/csharp.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextMode = require("./text").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules; 8 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 9 | var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; 10 | var CStyleFoldMode = require("./folding/cstyle").FoldMode; 11 | 12 | var Mode = function() { 13 | var highlighter = new CSharpHighlightRules(); 14 | this.$tokenizer = new Tokenizer(highlighter.getRules()); 15 | this.$outdent = new MatchingBraceOutdent(); 16 | this.$behaviour = new CstyleBehaviour(); 17 | this.$keywordList = highlighter.$keywordList; 18 | this.foldingRules = new CStyleFoldMode(); 19 | }; 20 | oop.inherits(Mode, TextMode); 21 | 22 | (function() { 23 | 24 | this.lineCommentStart = "//"; 25 | this.blockComment = {start: "/*", end: "*/"}; 26 | 27 | this.getNextLineIndent = function(state, line, tab) { 28 | var indent = this.$getIndent(line); 29 | 30 | var tokenizedLine = this.$tokenizer.getLineTokens(line, state); 31 | var tokens = tokenizedLine.tokens; 32 | 33 | if (tokens.length && tokens[tokens.length-1].type == "comment") { 34 | return indent; 35 | } 36 | 37 | if (state == "start") { 38 | var match = line.match(/^.*[\{\(\[]\s*$/); 39 | if (match) { 40 | indent += tab; 41 | } 42 | } 43 | 44 | return indent; 45 | }; 46 | 47 | this.checkOutdent = function(state, line, input) { 48 | return this.$outdent.checkOutdent(line, input); 49 | }; 50 | 51 | this.autoOutdent = function(state, doc, row) { 52 | this.$outdent.autoOutdent(doc, row); 53 | }; 54 | 55 | 56 | this.createWorker = function(session) { 57 | return null; 58 | }; 59 | 60 | }).call(Mode.prototype); 61 | 62 | exports.Mode = Mode; 63 | }); 64 | -------------------------------------------------------------------------------- /public/js/ace/theme/merbivore_soft.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-merbivore-soft"; 35 | exports.cssText = require("../requirejs/text!./merbivore_soft.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/pastel_on_dark.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-pastel-on-dark"; 35 | exports.cssText = require("../requirejs/text!./pastel_on_dark.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/solarized_dark.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-solarized-dark"; 35 | exports.cssText = require("../requirejs/text!./solarized_dark.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/textmate.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | "use strict"; 33 | 34 | exports.isDark = false; 35 | exports.cssClass = "ace-tm"; 36 | exports.cssText = require("../requirejs/text!./textmate.css"); 37 | 38 | var dom = require("../lib/dom"); 39 | dom.importCssString(exports.cssText, exports.cssClass); 40 | }); 41 | -------------------------------------------------------------------------------- /public/js/ace/theme/tomorrow_night.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-tomorrow-night"; 35 | exports.cssText = require("../requirejs/text!./tomorrow_night.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/clouds_midnight.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-clouds-midnight"; 35 | exports.cssText = require("../requirejs/text!./clouds_midnight.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/crimson_editor.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | exports.isDark = false; 33 | exports.cssText = require("../requirejs/text!./crimson_editor.css"); 34 | 35 | exports.cssClass = "ace-crimson-editor"; 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/eclipse.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | "use strict"; 33 | 34 | exports.isDark = false; 35 | exports.cssText = require("../requirejs/text!./eclipse.css"); 36 | 37 | exports.cssClass = "ace-eclipse"; 38 | 39 | var dom = require("../lib/dom"); 40 | dom.importCssString(exports.cssText, exports.cssClass); 41 | }); 42 | -------------------------------------------------------------------------------- /public/js/ace/theme/mono_industrial.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-mono-industrial"; 35 | exports.cssText = require("../requirejs/text!./mono_industrial.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/solarized_light.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = false; 34 | exports.cssClass = "ace-solarized-light"; 35 | exports.cssText = require("../requirejs/text!./solarized_light.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/tomorrow_night_blue.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-tomorrow-night-blue"; 35 | exports.cssText = require("../requirejs/text!./tomorrow_night_blue.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/tomorrow_night_bright.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-tomorrow-night-bright"; 35 | exports.cssText = require("../requirejs/text!./tomorrow_night_bright.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /public/js/ace/theme/tomorrow_night_eighties.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define(function(require, exports, module) { 32 | 33 | exports.isDark = true; 34 | exports.cssClass = "ace-tomorrow-night-eighties"; 35 | exports.cssText = require("../requirejs/text!./tomorrow_night_eighties.css"); 36 | 37 | var dom = require("../lib/dom"); 38 | dom.importCssString(exports.cssText, exports.cssClass); 39 | }); 40 | -------------------------------------------------------------------------------- /views/404.ejs: -------------------------------------------------------------------------------- 1 |

Page not found

2 | 3 |

The view you were trying to reach does not exist.

4 | 5 | 6 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_markdown.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["text","test: header 1 "] 4 | ],[ 5 | "start", 6 | ["markup.heading.1","#"], 7 | ["markup.heading","f"] 8 | ],[ 9 | "start", 10 | ["text","test: header 2"] 11 | ],[ 12 | "start", 13 | ["markup.heading.2","##"], 14 | ["markup.heading"," foo"] 15 | ],[ 16 | "start", 17 | ["text","test: header ends with ' #'"] 18 | ],[ 19 | "start", 20 | ["markup.heading.1","#"], 21 | ["markup.heading"," # # "] 22 | ],[ 23 | "start", 24 | ["text","test: header ends with '#'"] 25 | ],[ 26 | "start", 27 | ["markup.heading.1","#"], 28 | ["markup.heading","foo# "] 29 | ],[ 30 | "start", 31 | ["text","test: 6+ #s is not a valid header"] 32 | ],[ 33 | "start", 34 | ["text","####### foo"] 35 | ],[ 36 | "start", 37 | ["text","test: # followed be only space is not a valid header"] 38 | ],[ 39 | "start", 40 | ["text","# "] 41 | ],[ 42 | "start", 43 | ["text","test: only space between #s is not a valid header"] 44 | ],[ 45 | "start", 46 | ["text","# #"] 47 | ],[ 48 | "allowBlock" 49 | ],[ 50 | "start", 51 | ["markup.heading.1","#"], 52 | ["markup.heading"," test links "], 53 | ["text","["], 54 | ["string","Cloud9 IDE"], 55 | ["text","]("], 56 | ["markup.underline","http://www.c9.io/"], 57 | ["text",")"], 58 | ["markup.heading"," #"] 59 | ],[ 60 | "listblock", 61 | ["markup.list","* "], 62 | ["text","["], 63 | ["string","demo"], 64 | ["text","]("], 65 | ["markup.underline","http://ajaxorg.github.com/ace/"], 66 | ["text",")"], 67 | ["markup.list"," "] 68 | ],[ 69 | "listblock", 70 | ["markup.list","* usually "], 71 | ["string","*work*"], 72 | ["markup.list"," fine ("], 73 | ["string","_em_"], 74 | ["markup.list",")"] 75 | ],[ 76 | "listblock", 77 | ["markup.list","in lists"] 78 | ],[ 79 | "start" 80 | ],[ 81 | "start", 82 | ["text","in plain text "], 83 | ["meta.tag","<"], 84 | ["meta.tag.tag-name","b"], 85 | ["meta.tag.r",">"], 86 | ["text","http://ace.ajaxorg.com"], 87 | ["meta.tag","<"], 88 | ["meta.tag.tag-name","b"], 89 | ["meta.tag.r",">"] 90 | ],[ 91 | "allowBlock" 92 | ],[ 93 | "start" 94 | ]] -------------------------------------------------------------------------------- /public/js/ace/mode/powershell.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextMode = require("./text").Mode; 6 | var Tokenizer = require("../tokenizer").Tokenizer; 7 | var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules; 8 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 9 | var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; 10 | var CStyleFoldMode = require("./folding/cstyle").FoldMode; 11 | 12 | var Mode = function() { 13 | var highlighter = new PowershellHighlightRules(); 14 | 15 | this.$tokenizer = new Tokenizer(highlighter.getRules()); 16 | this.$keywordList = highlighter.$keywordList; 17 | this.$outdent = new MatchingBraceOutdent(); 18 | this.$behaviour = new CstyleBehaviour(); 19 | this.foldingRules = new CStyleFoldMode({start: "^\\s*(<#)", end: "^[#\\s]>\\s*$"}); 20 | }; 21 | oop.inherits(Mode, TextMode); 22 | 23 | (function() { 24 | 25 | this.lineCommentStart = "#"; 26 | this.blockComment = {start: "<#", end: "#>"}; 27 | 28 | this.getNextLineIndent = function(state, line, tab) { 29 | var indent = this.$getIndent(line); 30 | 31 | var tokenizedLine = this.$tokenizer.getLineTokens(line, state); 32 | var tokens = tokenizedLine.tokens; 33 | 34 | if (tokens.length && tokens[tokens.length-1].type == "comment") { 35 | return indent; 36 | } 37 | 38 | if (state == "start") { 39 | var match = line.match(/^.*[\{\(\[]\s*$/); 40 | if (match) { 41 | indent += tab; 42 | } 43 | } 44 | 45 | return indent; 46 | }; 47 | 48 | this.checkOutdent = function(state, line, input) { 49 | return this.$outdent.checkOutdent(line, input); 50 | }; 51 | 52 | this.autoOutdent = function(state, doc, row) { 53 | this.$outdent.autoOutdent(doc, row); 54 | }; 55 | 56 | 57 | this.createWorker = function(session) { 58 | return null; 59 | }; 60 | 61 | }).call(Mode.prototype); 62 | 63 | exports.Mode = Mode; 64 | }); 65 | -------------------------------------------------------------------------------- /public/js/ace/snippets/markdown.snippets: -------------------------------------------------------------------------------- 1 | # Markdown 2 | 3 | # Includes octopress (http://octopress.org/) snippets 4 | 5 | snippet [ 6 | [${1:text}](http://${2:address} "${3:title}") 7 | snippet [* 8 | [${1:link}](${2:`@*`} "${3:title}")${4} 9 | 10 | snippet [: 11 | [${1:id}]: http://${2:url} "${3:title}" 12 | snippet [:* 13 | [${1:id}]: ${2:`@*`} "${3:title}" 14 | 15 | snippet ![ 16 | ![${1:alttext}](${2:/images/image.jpg} "${3:title}") 17 | snippet ![* 18 | ![${1:alt}](${2:`@*`} "${3:title}")${4} 19 | 20 | snippet ![: 21 | ![${1:id}]: ${2:url} "${3:title}" 22 | snippet ![:* 23 | ![${1:id}]: ${2:`@*`} "${3:title}" 24 | 25 | snippet === 26 | `repeat('=', strlen(getline(line(".") - 1)))` 27 | 28 | ${1} 29 | snippet --- 30 | `repeat('-', strlen(getline(line(".") - 1)))` 31 | 32 | ${1} 33 | 34 | snippet blockquote 35 | {% blockquote %} 36 | ${1:quote} 37 | {% endblockquote %} 38 | 39 | snippet blockquote-author 40 | {% blockquote ${1:author}, ${2:title} %} 41 | ${3:quote} 42 | {% endblockquote %} 43 | 44 | snippet blockquote-link 45 | {% blockquote ${1:author} ${2:URL} ${3:link_text} %} 46 | ${4:quote} 47 | {% endblockquote %} 48 | 49 | snippet bt-codeblock-short 50 | ``` 51 | ${1:code_snippet} 52 | ``` 53 | 54 | snippet bt-codeblock-full 55 | ``` ${1:language} ${2:title} ${3:URL} ${4:link_text} 56 | ${5:code_snippet} 57 | ``` 58 | 59 | snippet codeblock-short 60 | {% codeblock %} 61 | ${1:code_snippet} 62 | {% endcodeblock %} 63 | 64 | snippet codeblock-full 65 | {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %} 66 | ${5:code_snippet} 67 | {% endcodeblock %} 68 | 69 | snippet gist-full 70 | {% gist ${1:gist_id} ${2:filename} %} 71 | 72 | snippet gist-short 73 | {% gist ${1:gist_id} %} 74 | 75 | snippet img 76 | {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %} 77 | 78 | snippet youtube 79 | {% youtube ${1:video_id} %} 80 | 81 | # The quote should appear only once in the text. It is inherently part of it. 82 | # See http://octopress.org/docs/plugins/pullquote/ for more info. 83 | 84 | snippet pullquote 85 | {% pullquote %} 86 | ${1:text} {" ${2:quote} "} ${3:text} 87 | {% endpullquote %} 88 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/text_asciidoc.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------ 2 | ----------------------------------- 3 | _ita_lic_, *bo*ld*, +mo+no+, normal. 4 | ``double quoted'', `single quoted'. 5 | normal, ^super^, ~sub~. 6 | 7 | '''' 8 | Escaped: 9 | \_italic_, +++_italic_+++, 10 | t\__e__st, +++t__e__st+++, 11 | +++bold+++, $$normal$$ 12 | \¶ ¶ 13 | \`not single quoted' 14 | \`\`not double quoted'' 15 | 16 | 17 | [fffff] 18 | +++++++++++++++++++++++++++++++++++++ 19 | (C) {ss} ss 20 | +++++++++++++++++++++++++++++++++++++ 21 | 22 | ............. 23 | callout <1> 24 | .............. 25 | 26 | > 1 27 | 1> 2 28 | <2> 3 29 | 30 | Escaped: 31 | \_italic_, 32 | t\__e__st, o__ 33 | 34 | .optional title 35 | ............. 36 | callout <1> 37 | .............. 38 | 39 | 40 | :macro: dddd 41 | 42 | .lists 43 | . 1 44 | .. 2 45 | ... d 46 | ..... big 47 | + 48 | continue + 49 | next line 50 | xi) no ++la+tin++ 51 | 52 | xi) la++tin++ 53 | 2. num__ber__ [red]#red# 54 | -- 55 | 5. f <> {macro} 56 | -- 57 | image::path[beauty] ->--<= -- replacements 58 | 59 | image::s 60 | sssss 61 | sss 62 | sssss 63 | 64 | 65 | == 1 66 | heading 67 | === not a heading 68 | ==================================== 69 | 70 | ================================== 71 | ====4 72 | NOTE: above 73 | 74 | NOTE: above 75 | 76 | [[x6]] 77 | WARNING: 78 | 79 | [options[]] 80 | --------------------------- 81 | literal 82 | --------------------------- 83 | 84 | 85 | = Tables 86 | |==================================== 87 | | _italic_ | *bold* | text | (R) 88 | 89 | |==================================== 90 | 91 | 92 | [more, options] 93 | /////////// 94 | comment 95 | /////////// 96 | // one line comment 97 | 98 | 99 | 100 | [red]#red text# [yellow-background]#on yellow# 101 | [big]#large# [red yellow-background big]*all bold* 102 | 103 | 104 | https://site text callto:ace http://ace.ajaxorg.com[awesome] 105 | .still normal text 106 | .break out thoug should not 107 | --------------------------- 108 | /////////////////////////// 109 | --------------------------- 110 | 111 | 112 | -------------------------------------------------------------------------------- /public/js/ace/mode/_test/tokens_java.json: -------------------------------------------------------------------------------- 1 | [[ 2 | "start", 3 | ["keyword","public"], 4 | ["text"," "], 5 | ["keyword","class"], 6 | ["text"," "], 7 | ["identifier","InfiniteLoop"], 8 | ["text"," "], 9 | ["lparen","{"] 10 | ],[ 11 | "start" 12 | ],[ 13 | "comment", 14 | ["text"," "], 15 | ["comment","/*"] 16 | ],[ 17 | "comment", 18 | ["comment"," * This will cause the program to hang..."] 19 | ],[ 20 | "comment", 21 | ["comment"," *"] 22 | ],[ 23 | "comment", 24 | ["comment"," * Taken from:"] 25 | ],[ 26 | "comment", 27 | ["comment"," * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/"] 28 | ],[ 29 | "start", 30 | ["comment"," */"] 31 | ],[ 32 | "start", 33 | ["text"," "], 34 | ["keyword","public"], 35 | ["text"," "], 36 | ["keyword","static"], 37 | ["text"," "], 38 | ["keyword","void"], 39 | ["text"," "], 40 | ["identifier","main"], 41 | ["lparen","("], 42 | ["support.function","String"], 43 | ["lparen","["], 44 | ["rparen","]"], 45 | ["text"," "], 46 | ["identifier","args"], 47 | ["rparen",")"], 48 | ["text"," "], 49 | ["lparen","{"] 50 | ],[ 51 | "start", 52 | ["text"," "], 53 | ["keyword","double"], 54 | ["text"," "], 55 | ["identifier","d"], 56 | ["text"," "], 57 | ["keyword.operator","="], 58 | ["text"," "], 59 | ["support.function","Double"], 60 | ["text","."], 61 | ["identifier","parseDouble"], 62 | ["lparen","("], 63 | ["string","\"2.2250738585072012e-308\""], 64 | ["rparen",")"], 65 | ["text",";"] 66 | ],[ 67 | "start" 68 | ],[ 69 | "start", 70 | ["text"," "], 71 | ["comment","// unreachable code"] 72 | ],[ 73 | "start", 74 | ["text"," "], 75 | ["support.function","System"], 76 | ["text","."], 77 | ["identifier","out"], 78 | ["text","."], 79 | ["identifier","println"], 80 | ["lparen","("], 81 | ["string","\"Value: \""], 82 | ["text"," "], 83 | ["keyword.operator","+"], 84 | ["text"," "], 85 | ["identifier","d"], 86 | ["rparen",")"], 87 | ["text",";"] 88 | ],[ 89 | "start", 90 | ["text"," "], 91 | ["rparen","}"] 92 | ],[ 93 | "start", 94 | ["rparen","}"] 95 | ]] -------------------------------------------------------------------------------- /views/500.ejs: -------------------------------------------------------------------------------- 1 |

Error

2 | 3 | 4 | <% _.each(errors, function (error) { %> 5 | 6 | 7 | <%= error %> 8 | 9 | 10 | <% }) %> 11 | 12 | 13 | -------------------------------------------------------------------------------- /public/js/ace/snippets/sh.snippets: -------------------------------------------------------------------------------- 1 | # Shebang. Executing bash via /usr/bin/env makes scripts more portable. 2 | snippet #! 3 | #!/usr/bin/env bash 4 | 5 | snippet if 6 | if [[ ${1:condition} ]]; then 7 | ${2:#statements} 8 | fi 9 | snippet elif 10 | elif [[ ${1:condition} ]]; then 11 | ${2:#statements} 12 | snippet for 13 | for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do 14 | ${3:#statements} 15 | done 16 | snippet fori 17 | for ${1:needle} in ${2:haystack} ; do 18 | ${3:#statements} 19 | done 20 | snippet wh 21 | while [[ ${1:condition} ]]; do 22 | ${2:#statements} 23 | done 24 | snippet until 25 | until [[ ${1:condition} ]]; do 26 | ${2:#statements} 27 | done 28 | snippet case 29 | case ${1:word} in 30 | ${2:pattern}) 31 | ${3};; 32 | esac 33 | snippet go 34 | while getopts '${1:o}' ${2:opts} 35 | do 36 | case $$2 in 37 | ${3:o0}) 38 | ${4:#staments};; 39 | esac 40 | done 41 | # Set SCRIPT_DIR variable to directory script is located. 42 | snippet sdir 43 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 44 | # getopt 45 | snippet getopt 46 | __ScriptVersion="${1:version}" 47 | 48 | #=== FUNCTION ================================================================ 49 | # NAME: usage 50 | # DESCRIPTION: Display usage information. 51 | #=============================================================================== 52 | function usage () 53 | { 54 | cat <<- EOT 55 | 56 | Usage : $${0:0} [options] [--] 57 | 58 | Options: 59 | -h|help Display this message 60 | -v|version Display script version 61 | 62 | EOT 63 | } # ---------- end of function usage ---------- 64 | 65 | #----------------------------------------------------------------------- 66 | # Handle command line arguments 67 | #----------------------------------------------------------------------- 68 | 69 | while getopts ":hv" opt 70 | do 71 | case $opt in 72 | 73 | h|help ) usage; exit 0 ;; 74 | 75 | v|version ) echo "$${0:0} -- Version $__ScriptVersion"; exit 0 ;; 76 | 77 | \? ) echo -e "\n Option does not exist : $OPTARG\n" 78 | usage; exit 1 ;; 79 | 80 | esac # --- end of case --- 81 | done 82 | shift $(($OPTIND-1)) 83 | 84 | --------------------------------------------------------------------------------