This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:syntastic_javascript_checkers = ['jshint'] | |
nmap <leader><space> :%s/[\ \|\t]*$//g<CR> | |
" Don't accept arrow keys. | |
noremap <left> :echo "no!"<cr> | |
noremap <right> :echo "no!"<cr> | |
noremap <up> :echo "no!"<cr> | |
noremap <down> :echo "no!"<cr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-environment DOCKER_CERT_PATH $DOCKER_CERT_PATH | |
set-environment DOCKER_HOST $DOCKER_HOST | |
set-environment DOCKER_TLS_VERIFY $DOCKER_TLS_VERIFY | |
# set prefix key to ctrl+a until I have time to adapt | |
unbind C-b | |
set -g prefix C-s | |
# send the prefix to client inside window (ala nested sessions) | |
bind-key S send-prefix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head></head> | |
<body> | |
<h1>Hello World</h1> | |
<input id="unit" placeholder="Please enter unit number" /> | |
<button id="join">JOIN</button> | |
<button id="leave">LEAVE</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var R = require('ramda'), | |
Future = require('data.task'), | |
// add :: Number -> Number -> Number | |
add = R.curry(function (a, b) { | |
return new Future(function (reject, resolve) { | |
resolve(a + b); | |
}); | |
}), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var R = require ('ramda'), | |
Future = require ('data.task'), | |
log = console.log, | |
add = R.curry (function (a, b) { | |
return a + b; | |
}), | |
nil = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
Future = require ('data.task'), | |
//Future = require ('data.future'), | |
//Future = require ('fantasy-promises'), | |
R = require ('ramda'), | |
M = require ('control.monads'), | |
mysql = require ('mysql'), | |
log = function (x) { console.log (x); }, | |
logI = function (x) { log (x); return x; }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint laxbreak: true, laxcomma: true */ | |
/* Create a view using the following: | |
* create view {{resource}}_view as | |
* select * from {{resource}} r1 | |
* where r1.inserted_at = (select r2.inserted_at from {{resource}} r2 | |
* where r1.internalid = r2.internalid | |
* order by CAST(r2.inserted_at as UNSIGNED) desc limit 1); | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Basics | |
unbind C-b | |
set -g prefix C-s | |
set -g mode-keys vi | |
set -g status-keys vi | |
set -g default-terminal "screen-256color" | |
# Other binds | |
bind-key R source ~/.tmux.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Future = require ('data.future'), | |
R = require ('ramda'), | |
log = console.log, | |
id = function (x) { return x; }, | |
trampoline = function (fn) { | |
return function () { | |
var args = arguments; | |
var f = function () { return fn.apply (this, args); } |