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 {
gh_url=${1:-`pbpaste`}
repo_name=$(basename $gh_url | sed -e 's/\.git//')
co_dir=${HOME}/github/${repo_name}
if [ -d $co_dir ]; then
cd $co_dir && git pull origin master
else
git clone "${gh_url}" "${co_dir}" && cd "${co_dir}"
fi
View -
Date/Time Summary
11/23/16 11:48 PM Delivered: postmaster@mg.teesforthepeople.com → Sales@sanmarcanada.com 'Purchase order for Shirt Goods from Teesforthepeople.com'
{
"tags": [
"goods-request",
"provider-request"
],
"envelope": {
"transport": "smtp",
View mj_sql_notes.md
View JavaScript-scope-playground.js
var outerFunction = function(){
if(true){
var x = 5;
//console.log(y); //line 1, ReferenceError: y not defined
}
var nestedFunction = function() {
if(true){
@lastobelus
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;
myArray[0];
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");
mary();
console.log("back in bob");
console.groupEnd();
}
function mary() {
console.group("in mary");
View script-tag.html
<html>
<head>
<script>
// Inline javascript
</script>
<script src=“external_javascript.js”></script>
</head>
<body>
View demo-01.html
<html>
<head>
</head>
<body>
<h1>Output</h1>
<div id="output"></div>
<script type="text/javascript">
</script>
</body>
</html>
View demo-01.html
<html>
<head>
<script type="text/javascript">
</script>
</head>
<body id="output"></body>
</html>
View RickshawGraph.md

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.