Just an idea, to practice after reading about redux async actions and middleware
the important part is this function
let INTERVAL = 50
let runTimer = () => {
return (dispatch, getState) => {
/* | |
* Use this to turn on logging: (in your local extensions file) | |
*/ | |
Handlebars.logger.log = function(level) { | |
if(level >= Handlebars.logger.level) { | |
console.log.apply(console, [].concat(["Handlebars: "], _.toArray(arguments))); | |
} | |
}; | |
// DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, |
#telnet into the drone (telnet 192.168.1.1) | |
#paste the following command: | |
killall udhcpd; iwconfig ath0 mode managed essid [ssid]; ifconfig ath0 [wanted ip] netmask 255.255.255.0 up; | |
#ex. killall udhcpd; iwconfig ath0 mode managed essid Roflcopter; ifconfig ath0 192.168.43.201 netmask 255.255.255.0 up; |
# this can be put in [repo]/.git/config for local settings | |
# or ~/.gitconfig for global settings | |
# create a difftool "nodiff" that just returns true | |
# this path is for Mac. On linux it's /bin/true i guess | |
[diff "nodiff"] | |
command = /usr/bin/true | |
# make git ignore white space differences, many different possibilites here |
Just an idea, to practice after reading about redux async actions and middleware
the important part is this function
let INTERVAL = 50
let runTimer = () => {
return (dispatch, getState) => {
// underscore's throttle-metod | |
var throttle = function(func, wait) { | |
var context, args, timeout, throttling, more, result; | |
var whenDone = _.debounce(function(){ more = throttling = false; }, wait); | |
return function() { | |
context = this; args = arguments; | |
var later = function() { | |
timeout = null; | |
if (more) func.apply(context, args); |
is it http or https? - use these adapters
is it not? - pick the first one in the list of 'preferred adapters'
const common = {} | |
let config = {} | |
export function setup = url => { | |
van: { | |
...common, | |
remoteDbUrl: process.env.REACT_APP_VAN_COUCHDB_URL || 'http://localhost:5984/', | |
dateFormats: { | |
long: 'D MMM, YYYY', | |
week: 'YYYY-[W]WW' |
/* | |
* Example of using nested collections/models with backbone.js and backbone.js localStorage | |
* | |
* Read the complete blog post at karlwestin.posterous.com | |
* | |
* 1. run populate() from command line first time | |
* 2. reload the page (or open in another browser tab), and check the following: | |
* | |
* premier.at(0).get("name") => "Tottenham" | |
* premier.at(0).players.length => 3 |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Polymer</title> | |
<meta charset="utf-8" /> | |
<script type="text/javascript" charset="utf-8" src="pubsub.js"> </script> | |
<script type="text/javascript" charset="utf-8" src="polymer/polymer.js"> </script> | |
<link rel="import" href="publisher.html"> | |
<link rel="import" href="subscriber.html"> | |
</head> |
describe("test suite that you wanna perf", function() { | |
beforeEach(function() { | |
this.start = performance.now(); | |
}); | |
afterEach(function() { | |
console.log(jasmine.getEnv().currentSpec.description, performance.now() - this.start); | |
}); | |
}); |