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 \| 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>"; |
| { | |
| "validthis" : true | |
| , "laxcomma" : true | |
| , "laxbreak" : true | |
| , "browser" : true | |
| , "boss" : true | |
| , "expr" : true | |
| , "asi" : true | |
| } |
Lovingly skimmed from this guide
$ hostnameopenssl req -new -x509 -days 365 -sha1 -newkey rsa:1024 -nodes \| numberWithCommas: function(num) { | |
| return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
| } |
| formatCurrency: function(value, noCents) { | |
| if (!isPrice.test(value)) { | |
| return value; | |
| } | |
| noCents = noCents || false; | |
| var precision = 2 | |
| , price = parseFloat( Math.abs(value) ).toFixed(precision) | |
| , priceArray = String(price).split('.') |
| // go to https://github.com/dashboard/pulls | |
| $('.listing .js-navigation-open').each( | |
| function(key, value) { | |
| console.log('https://github.com' + $(value).attr('href')); | |
| }); |
| #!/bin/bash | |
| EMAIL='YOUR_EMAIL' # edit this | |
| PASS='YOUR_PASSWORD' # edit this | |
| COOKIES='cookies.txt' | |
| USER_AGENT='Firefox/3.5' | |
| curl -X POST 'https://github.com/login' --verbose --user-agent $USER_AGENT --data-urlencode "name=${EMAIL}" --data-urlencode "pass=${PASS}" --cookie $COOKIES --cookie-jar $COOKIES | |
| curl -X GET 'https://github.com/dashboard/pulls' --verbose --user-agent $USER_AGENT --cookie $COOKIES --cookie-jar $COOKIES |
| var hey = {}; | |
| (function() { | |
| function woot() { | |
| return 'hi'; | |
| } | |
| function who() { | |
| return 'me'; | |
| } |
| 'use strict'; | |
| // Add ECMA262-5 method binding if not supported natively | |
| // | |
| if (!('bind' in Function.prototype)) { | |
| Function.prototype.bind= function(owner) { | |
| var that= this; | |
| if (arguments.length<=1) { | |
| return function() { | |
| return that.apply(owner, arguments); |
| function openHandler(widgetTypeId, userWidgetId, displayOrder, savePrefUrl) { | |
| // some stuff | |
| Utils.addEvent(btnSave, 'click', function () { | |
| btnSaveClick(widgetTypeId, userWidgetId, displayOrder, savePrefUrl); | |
| }); | |
| } | |
| function btnSaveClick(typeId, widgetId, order, url) { | |
| // definition |