Skip to content

Instantly share code, notes, and snippets.

Michael Johnston lastobelus

Block or report user

Report or block lastobelus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View -
function glone {
repo_name=$(basename $gh_url | sed -e 's/\.git//')
if [ -d $co_dir ]; then
cd $co_dir && git pull origin master
git clone "${gh_url}" "${co_dir}" && cd "${co_dir}"
View -
Date/Time Summary
11/23/16 11:48 PM Delivered: → 'Purchase order for Shirt Goods from'
"tags": [
"envelope": {
"transport": "smtp",
View JavaScript-scope-playground.js
var outerFunction = function(){
var x = 5;
//console.log(y); //line 1, ReferenceError: y not defined
var nestedFunction = function() {
lastobelus / while-for-bench.js
Last active Jan 21, 2016
Quick and dirty benchmarks of for vs negative while loop in javascript
View while-for-bench.js
var i = 100000;
var myArray = [];
while(i--) myArray[i] = i;
console.log("------- for loop always evaluating length-------")
var forResult = 0; console.time("for"); for(var i=0; i < myArray.length; i++) { forResult += myArray[i] }; console.log("forResult: %i", forResult); console.timeEnd("for");
console.log("------- for loop with length in var-------")
var forResult2 = 0; console.time("for2"); for(var i=0, len = myArray.length; i < len; i++) { forResult2 += myArray[i] }; console.log("forResult2: %i", forResult2); console.timeEnd("for2");
View group.js
function bob(){
console.groupCollapsed("in bob");
console.log("calling mary");
console.log("back in bob");
function mary() {"in mary");
View script-tag.html
// Inline javascript
<script src=“external_javascript.js”></script>
View demo-01.html
<div id="output"></div>
<script type="text/javascript">
View demo-01.html
<script type="text/javascript">
<body id="output"></body>

Graphing Widget

The graphing widget shows graphs using the Rickshaw graphing library. The names of data fields should be (vaguely) familiar if you've used Rickshaw before.

It's recommended that you replace the /assets/javascripts/rickshaw.min.js from your dashboard with the latest from here.

Supported HTML data fields

You can’t perform that action at this time.