| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | <!doctype html><meta charset=utf-8><title>CodeMirror: Shell mode</title><link rel=stylesheet href=../../lib/codemirror.css><link rel=stylesheet href=../../doc/docs.css><style type=text/css>  .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style><script src=../../lib/codemirror.js></script><script src="../../addon/edit/matchbrackets.js"></script><script src=shell.js></script><h1>CodeMirror: Shell mode</h1><textarea id=code>#!/bin/bash# clone the repositorygit clone http://github.com/garden/tree# generate HTTPS credentialscd treeopenssl genrsa -aes256 -out https.key 1024openssl req -new -nodes -key https.key -out https.csropenssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crtcp https.key{,.orig}openssl rsa -in https.key.orig -out https.key# start the server in HTTPS modecd websudo node ../server.js 443 'yes' >> ../node.log &# here is how to stop the serverfor pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do  sudo kill -9 $pid 2> /dev/nulldoneexit 0</textarea><script>  var editor = CodeMirror.fromTextArea(document.getElementById('code'), {    mode: 'shell',    lineNumbers: true,    matchBrackets: true  });</script><p><strong>MIME types defined:</strong> <code>text/x-sh</code>.</p>
 |