9a2ef7c4cd77b079120538cc4d1c51f2a6ccc250
[myslice.git] / third-party / codemirror-3.15 / mode / shell / index.html
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="../../addon/edit/matchbrackets.js"></script>
14 <script src=shell.js></script>
15
16 <h1>CodeMirror: Shell mode</h1>
17
18 <textarea id=code>
19 #!/bin/bash
20
21 # clone the repository
22 git clone http://github.com/garden/tree
23
24 # generate HTTPS credentials
25 cd tree
26 openssl genrsa -aes256 -out https.key 1024
27 openssl req -new -nodes -key https.key -out https.csr
28 openssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crt
29 cp https.key{,.orig}
30 openssl rsa -in https.key.orig -out https.key
31
32 # start the server in HTTPS mode
33 cd web
34 sudo node ../server.js 443 'yes' &gt;&gt; ../node.log &amp;
35
36 # here is how to stop the server
37 for pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do
38   sudo kill -9 $pid 2&gt; /dev/null
39 done
40
41 exit 0</textarea>
42
43 <script>
44   var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
45     mode: 'shell',
46     lineNumbers: true,
47     matchBrackets: true
48   });
49 </script>
50
51 <p><strong>MIME types defined:</strong> <code>text/x-sh</code>.</p>