This is what we did to setup a few dashboards at platanus
- Raspberry Pi
- Dashing Service
- Wifi stick (optional)
<!-- | |
Complete feature detection for ES modules. Covers: | |
1. Static import: import * from './foo.js'; | |
2. Dynamic import(): import('./foo.js').then(module => {...}); | |
Demo: http://jsbin.com/tilisaledu/1/edit?html,output | |
Thanks to @_gsathya, @kevincennis, @rauschma, @malyw for the help. | |
--> |
// In v2/3 you did this: | |
import ReactDOM from 'react-dom' | |
import { Router, browserHistory, Route } from 'react-router' | |
ReactDOM.render( | |
<Router> | |
<Route path="/about" component={About}/> | |
<Route path="/:username" component={User}/> | |
</Router> | |
) |
class TodoStore extends BaseStore { | |
// Constructor is executed in the config phase. | |
constructor(stores, initialState) { | |
super(stores, initialState) // ensures initial state loads for SSR | |
// Other store initialization... | |
} | |
// This is executed in the run phase, after all stores have initialized. | |
storeDidInitialize(stores) { |
if (typeof Promise === 'undefined') { | |
require.ensure([], (require) => { | |
require('imports?this=>window!es6-promise') | |
}) | |
} | |
if (typeof fetch === 'undefined') { | |
require.ensure([], (require) => { | |
require('imports?self=>window!whatwg-fetch') | |
}) |
This is what we did to setup a few dashboards at platanus
<div id="consolelog" style="font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 40px 30px 0px; background-color: white; border: 2px solid black; padding: 10px;"></div> | |
<input type="text" id="consoleinput" style="margin: 0px 30px; width: 400px;" onkeypress="return evalConsoleInput(event, this.value);" /> | |
<script type="text/javascript"> | |
var appendConsole = function(message, type) { | |
var color = "black"; | |
if (type === "error") { | |
color = "red"; | |
} else if (type === "debug") { |
if("undefined" === typeof document.currentScript){ | |
(function(){ | |
/***************************************************************************/ | |
/* document.currentScript polyfill + improvements */ | |
/***************************************************************************/ | |
var scripts = document.getElementsByTagName('script'); | |
document._currentScript = document.currentScript; | |
// return script object based off of src | |
var getScriptFromURL = function(url) { |
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
sub jmbag_check { | |
my $jmbag = shift; | |
$jmbag = sprintf "%09d", $jmbag if length $jmbag < 9; | |
my $sum = 0; | |
my $pos = 0; |