Skip to content

Instantly share code, notes, and snippets.

@tnrn9b
tnrn9b / graph.js
Created September 4, 2016 08:59 — forked from TrevorBasinger/graph.js
/* jshint laxbreak: true, laxcomma: true */
(function (R, A) {
var mkSensorUrl = function (unit) { return 'http://10.50.2.213:8080/v2/units/' + unit + '/sensors'; },
mkChart = R.curry (function (el, label) {
return new Highcharts.Chart({ chart: { renderTo: el
, defaultSeriesType: 'line' }
, title: { text: 'Live '+label+' data' }
, xAxis: { type: 'datetime'
, tickLength: 1 }
@tnrn9b
tnrn9b / chart-getdata.js
Created September 4, 2016 08:54
With Highstock JS v2.0.4 (2014-09-02)
var historyCharts;
$(document).ready(function() {
var url;
url = $('#history-path').val();
if (url.length > 0) {
$.ajax({
url: url,
context: document.body
}).done(function(data) {
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@tnrn9b
tnrn9b / bash-cheatsheet.sh
Created September 4, 2016 08:43 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
// Highcharts CheatSheet Part 1.
// Create interactive charts easily for your web projects.
// Download: http://www.highcharts.com/download
// More: http://api.highcharts.com/highcharts
// 1. Installation.
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks.
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
// <script src="https://code.highcharts.com/highcharts.js"></script>