aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/shell/index.html
diff options
context:
space:
mode:
authorAnanya Sen2012-07-16 16:04:05 -0700
committerAnanya Sen2012-07-16 16:04:05 -0700
commit0e04fff0ea80fa5cbe96b8354db38bd334aea83a (patch)
tree212d164c0f83d80394e34f1df532ea0461ad328d /imports/codemirror/mode/shell/index.html
parent5146f224258929415adf4a8022e492454b4e2476 (diff)
downloadninja-0e04fff0ea80fa5cbe96b8354db38bd334aea83a.tar.gz
upgrade to codemirror 2.3
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com> Conflicts: js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'imports/codemirror/mode/shell/index.html')
-rw-r--r--imports/codemirror/mode/shell/index.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/imports/codemirror/mode/shell/index.html b/imports/codemirror/mode/shell/index.html
new file mode 100644
index 00000000..2d6d0847
--- /dev/null
+++ b/imports/codemirror/mode/shell/index.html
@@ -0,0 +1,50 @@
1<!doctype html>
2<meta charset=utf-8>
3<title>CodeMirror: Shell mode</title>
4
5<link rel=stylesheet href=../../lib/codemirror.css>
6<link rel=stylesheet href=../../doc/docs.css>
7
8<style type=text/css>
9 .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
10</style>
11
12<script src=../../lib/codemirror.js></script>
13<script src=shell.js></script>
14
15<h1>CodeMirror: Shell mode</h1>
16
17<textarea id=code>
18#!/bin/bash
19
20# clone the repository
21git clone http://github.com/garden/tree
22
23# generate HTTPS credentials
24cd tree
25openssl genrsa -aes256 -out https.key 1024
26openssl req -new -nodes -key https.key -out https.csr
27openssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crt
28cp https.key{,.orig}
29openssl rsa -in https.key.orig -out https.key
30
31# start the server in HTTPS mode
32cd web
33sudo node ../server.js 443 'yes' &gt;&gt; ../node.log &amp;
34
35# here is how to stop the server
36for pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do
37 sudo kill -9 $pid 2&gt; /dev/null
38done
39
40exit 0</textarea>
41
42<script>
43 var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
44 mode: 'shell',
45 lineNumbers: true,
46 matchBrackets: true
47 });
48</script>
49
50<p><strong>MIME types defined:</strong> <code>text/x-sh</code>.</p>