I’ve set up a Javascript execution environment.
It isn’t much — there are two elements in the page. The bottom part is a Javascript command line which executes whatever single line of Javascript code is entered. The top part is an edit area to write larger pieces of Javascript code. The larger piece of code can be executed by calling the “run()” function from the command line.
Also, a command history is maintained on the command line. Use the up and down arrows to scroll through previously entered commands. The contents of the top editor area can be stored by using the File->Save Cookie and File->Load Cookie functions.
Go ahead and try it, you can start with alert(”Hello World!”) in the command line.
Posted in Uncategorized | Comments (0)
In case you are not familiar with it, nano is a basic text editor that comes with many Linux distributions. It has a lower learning curve than vi or emacs, but also fewer features.
However, you can spruce nano up a bit by enabling features in its configuration file, “.nanorc” under your home directory. Specifically, you can provide regular expression based syntax highlighting rules.
For your entertainment, I present meta-syntax highlighting rules for nano. These syntax rules, when put into your .nanrc file, will cause nano to syntax highlight the .nanorc file.
syntax "nanorc" "\.nanorc$"
color brightred "(color|syntax|set|start=|end=)"
color green "(red|brightred|green|brightgreen|blue|brightblue|cyan|brightcyan|white|brightwhite|yellow|brightyellow)"
color brightcyan "#+(.*)"
color brightyellow "\"(([^']|\\\")*|\[(^]]|\\\]|\^\])*\])*\""
color brightblue "[^\\\^]\[(\^\])?([^]]|[\\]{1,3,5,7,9}\])*\]"
color brightgreen "\(" "\)" "[|]"
color brightred "\^"
color red "\\."
Here is what this looks like when applied (to itself):

Posted in Uncategorized | Comments (0)