)
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 | Cite
2 |
3 |
Login
4 |
5 |
6 |
7 |
8 |
9 |
Signup
10 |
11 |
12 |
13 |
14 |
15 |
16 |
Users
17 |
18 | <% _.each(users, function(user) { %>
19 | - <%= user.username %>
20 | <% }) %>
21 |
22 |
23 |
--------------------------------------------------------------------------------
/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', <
3 | snippet dir
4 |
5 | DirectoryIndex ${2:index.html}
6 | Order Deny,Allow
7 | Deny from All
8 |
9 | #
10 | snippet filesmatch
11 |
12 | ${2}
13 |
14 | #
15 | snippet ifmodule
16 |
17 | ${2}
18 |
19 | #
20 | snippet limitexcept
21 |
22 | ${2}
23 |
24 | #
25 | snippet proxy
26 |
27 | ${2}
28 |
29 | #
30 | snippet virtualhost
31 |
32 | ServerAdmin ${3:webmaster@example.com}
33 | DocumentRoot ${4:/www/example.com}
34 | ServerName ${5:www.example.com}
35 |
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 |
2 |
3 |
4 | <%- 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 | %def>
5 | snippet call
6 | <%call expr="${1:name}">
7 | ${2:}
8 | %call>
9 | snippet doc
10 | <%doc>
11 | ${1:}
12 | %doc>
13 | snippet text
14 | <%text>
15 | ${1:}
16 | %text>
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",""],
8 | ["meta.tag.tag-name","Kinners"],
9 | ["meta.tag.r",">"]
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",""],
17 | ["meta.tag.tag-name.script","script"],
18 | ["meta.tag.r",">"],
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",""],
49 | ["meta.tag.tag-name","html"],
50 | ["meta.tag.r",">"]
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",""],
21 | ["meta.tag.tag-name.script","script"],
22 | ["meta.tag.r",">"],
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 
17 | snippet ${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 |
--------------------------------------------------------------------------------