Lovingly skimmed from this guide
- Find your local host name, and hang onto it for later use
$ hostname- Create a self-signed SSL cert:
openssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 -nodes \| numberWithCommas: function(num) { | |
| return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
| } |
Lovingly skimmed from this guide
$ hostnameopenssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 -nodes \| { | |
| "validthis" : true | |
| , "laxcomma" : true | |
| , "laxbreak" : true | |
| , "browser" : true | |
| , "boss" : true | |
| , "expr" : true | |
| , "asi" : true | |
| } |
| function debug ($data) { | |
| echo "<script>\r\n//<![CDATA[\r\nif(!console){var console={log:function(){}}}"; | |
| $output = explode("\n", print_r($data, true)); | |
| foreach ($output as $line) { | |
| if (trim($line)) { | |
| $line = addslashes($line); | |
| echo "console.log(\"{$line}\");"; | |
| } | |
| } | |
| echo "\r\n//]]>\r\n</script>"; |