Compile with:
webpack --config vendor.webpack.config.js
webpack --config app.webpack.config.jsUse with the following index.html
Compile with:
webpack --config vendor.webpack.config.js
webpack --config app.webpack.config.jsUse with the following index.html
This is a proof of concept which allows you to replay system events in a random order each time to make sure your UI can tolerate variable states.
I'm not sure if this is worthy of its on open source project with additional features like changing play back time, whitelisting/blacklisting actions etc but figured I'd put this out there to see if it piques anyones interest.
See a video of this in action here: [https://www.youtube.com/watch?v=wkoukONfwmA](Video on YouTube).
| #!/bin/bash | |
| # Functions ============================================== | |
| # return 1 if global command line program installed, else 0 | |
| # example | |
| # echo "node: $(program_is_installed node)" | |
| function program_is_installed { | |
| # set to 1 initially | |
| local return_=1 |
Can't share the complete code because the app's closed source and still in stealth mode, but here's how I'm using React Router and Redux in a large app with server rendering and code splitting on routes.
addReducers() callback available to the getComponents() method of
each React Router route. Each route is responsible for adding any Redux
reducers it needs when it's loaded. (This isn't really necessary on the| import { createStore, applyMiddleware } from 'redux'; | |
| import { Observable, Subject } from 'rxjs'; | |
| const api = type => { | |
| console.log(`calling API ${type}`); | |
| return new Promise(res => setTimeout(() => res(), 500)); | |
| }; | |
| const actionOrder = (actions, order) => actions.every((action, index) => action.type === order[index]); | |
| const actionPredicate = actions => filterableAction => actions.some(action => action === filterableAction.type); |
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
I got hit by the weird group reassignment when I upgraded to Mavericks. In my case the group was macports (!). I’ve seen one report from a user who got cloakproxy after the 10.11 upgrade, so apparently the bug is still there.
For some reason the OS X upgrader sometimes picks a group and changes the PrimaryGroupID to 20. Here’s the confirm:
dscl . -read Groups/cloakproxy
dscl . -read Groups/staff
And the fix:
This is a list of guidelines to make your Javascript faster, often associated with jsPerf benchmarks.
If you have an existing codebase, don't get carried away with premature optimizations. Profile to find the slow bits and pick the low hanging fruit.
Some of the latter lessons in Code School's Chrome DevTools course will teach you how to profile your code.
Paste this into this tool and make the necessary changes, then export as HTML and paste that into the podbean episode stuff.
Use this template for the title of the episode:
number ngAir - title
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |