diff options
author | Ananya Sen | 2012-07-17 14:25:53 -0700 |
---|---|---|
committer | Ananya Sen | 2012-07-17 14:25:53 -0700 |
commit | 09457e39532e9b35afb9c635266755bfcb9b488a (patch) | |
tree | 665dcbd41377b98dcab15ff995e9434d9db1a462 /imports/codemirror/mode/shell/index.html | |
parent | f2dbca782bbaca3bed96dff808693693ba083ea9 (diff) | |
parent | 4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff) | |
download | ninja-09457e39532e9b35afb9c635266755bfcb9b488a.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into copy-paste-bugfix
Diffstat (limited to 'imports/codemirror/mode/shell/index.html')
-rw-r--r-- | imports/codemirror/mode/shell/index.html | 50 |
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 | ||
21 | git clone http://github.com/garden/tree | ||
22 | |||
23 | # generate HTTPS credentials | ||
24 | cd tree | ||
25 | openssl genrsa -aes256 -out https.key 1024 | ||
26 | openssl req -new -nodes -key https.key -out https.csr | ||
27 | openssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crt | ||
28 | cp https.key{,.orig} | ||
29 | openssl rsa -in https.key.orig -out https.key | ||
30 | |||
31 | # start the server in HTTPS mode | ||
32 | cd web | ||
33 | sudo node ../server.js 443 'yes' >> ../node.log & | ||
34 | |||
35 | # here is how to stop the server | ||
36 | for pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do | ||
37 | sudo kill -9 $pid 2> /dev/null | ||
38 | done | ||
39 | |||
40 | exit 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> | ||