W3C Introduction to Web Components - explainer/overview of the technologies
import java.util.ArrayList; | |
import java.util.List; | |
import redis.clients.jedis.Jedis; | |
import redis.clients.jedis.JedisPool; | |
import redis.clients.jedis.JedisPoolConfig; | |
import redis.clients.jedis.Protocol; | |
// Connect to Redis server | |
String redisHost = vars.get("redis.host"); |
; -*- mode: clojure; -*- | |
; vim: filetype=clojure | |
(logging/init {:file "/var/log/riemann/riemann.log"}) | |
; Listen on the local interface over TCP (5555), UDP (5555), and websockets | |
; (5556) | |
(let [host "0.0.0.0"] | |
(tcp-server {:host host}) | |
(udp-server {:host host}) |
angular.module('d3', []) | |
.factory('d3Service', ['$document', '$window', '$q', '$rootScope', | |
function($document, $window, $q, $rootScope) { | |
var d = $q.defer(), | |
d3service = { | |
d3: function() { return d.promise; } | |
}; | |
function onScriptLoad() { | |
// Load client in the browser | |
$rootScope.$apply(function() { d.resolve($window.d3); }); |
/** | |
* To scroll into view for an element as a workaround for chromedriver issue | |
* @param {Object} selector - CSS selector only | |
* | |
* */ | |
export default function scrollToElement(selector) { | |
let viewportObj = browser.getViewportSize(); | |
let viewportHeight = viewportObj.height; | |
let viewportWidth = viewportObj.width; |
"use strict"; | |
this.MysqlBinlogTailer = MysqlBinlogTailer; | |
var EventEmitter = require('events').EventEmitter; | |
var fs = require('fs'); | |
var path = require('path'); | |
/** | |
* Tails a Mysql binlog and emits an event for every query executed. | |
*/ |
Jake Archibald (@jaffathecake): The ServiceWorker is coming; look busy
https://speakerdeck.com/jaffathecake/the-serviceworker-is-coming-look-busy
https://github.com/jakearchibald/trained-to-thrill/
https://www.youtube.com/watch?v=SmZ9XcTpMS4
Hunter Loftis (@hunterloftis): We Will All Be Game Progmrammers
http://wwabgp.herokuapp.com/s
http://youtu.be/QX0eauXBKwc
CarterRabasa (@carterrabasa): A Community of People; Not Projects
// Start `node d3-server.js` | |
// Then visit http://localhost:1337/ | |
// | |
var d3 = require('d3'), | |
http = require('http') | |
http.createServer(function (req, res) { | |
// Chrome automatically sends a requests for favicons | |
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't | |
// fixed or this is a regression. |
Reposted from Qiita
For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.
There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.
If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://unpkg.com/mobx@2.6.0/lib/mobx.umd.js"></script> | |
<script> | |
var MobxDemo = Object.create(HTMLElement.prototype); | |
MobxDemo.attachedCallback = function() { | |
var state = mobx.observable({ | |
counter : parseInt(this.getAttribute("counter")) | |
}) |