(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
var fstream = require("fstream"), | |
tar = require("tar"), | |
zlib = require("zlib"); | |
fstream.Reader("src").pipe(tar.Pack()).pipe(zlib.createGzip()).pipe(fstream.Writer("output.tar.gz")); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
function processBodyChunkwiseWithProgress(res, processChunk) { | |
const dummyEventTarget = document.createElement("div"); // why isn't EventTarget constructible? :( | |
const lengthComputable = res.headers.has("Content-Length"); | |
const total = res.headers.get("Content-Length") || 0; | |
let loaded = 0; | |
// Using http://underscorejs.org/#throttle | |
const fireProgressThrottled = _.throttle(fireProgress, 50, { trailing: false }); |
Unity has built-in support for hotswapping, which is a huge productivity booster. This feature works not only with graphics assets like bitmaps and meshes, but also with code: if you edit the source and save it, the editor will save the state of the running game, compile and load the new code, then load the saved state and continue where it left off. Unfortunately, this feature is very easy to break, and most available 3rd party plugins have little regard for it.
It looks like there’s a lot of confusion about hotswapping in Unity, and many developers are not even aware of its existence – which is no wonder if their only experience is seeing lots of errors on the console when they forget to stop the game before recompiling... This document is an attempt to clear up some of this confusion.
Nota bene, I’m not a Unity developer, so everything below is based on blog posts and experimentation. Corrections are most welcome!
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
So far...
A talk by @inconshreveable at The Strange Loop 2016 called "Idealized Commit Logs: Code Simplification via Program Slicing" about the amazing tools that can be built with program slicing inspired me to work on this project. Learn more about program slicing here.
This is actual output from slice-js (not yet open source), a program slicing tool that I'm working on right now. I can't wait to work out more kinks, make it more practically useful and show it to you all!
The match-sorter.js
file is the transpiled CommonJS version of match-sorter
and you can find that here.
require('./module.js') // { a: 1 } | |
import module from './module.js' // undefined | |
import { a } from './module.js' // 1 | |
require('./module2.js') // { default: { a: 1 }, b: 2 } | |
import module2 from './module2.js' // { a: 1} | |
import { b } from './module2.js' // 2 | |
require('./module3.js') // { default: { a: 1 }, b: 2 } |
#!/bin/sh | |
EMULATOR="cloud-firestore-emulator" | |
EMULATOR_TARGET=$(find ~/.cache/firebase/emulators/ -type f -name "$EMULATOR*.jar" | sort -r | head -n1) | |
if [ -z "$EMULATOR_TARGET" ]; then | |
echo "Could not find the firestore emulator. Ending test run." | |
exit 1 | |
fi |
import React from 'react' | |
/** | |
* @typedef {object} State The state of asynchronous hooks. | |
* @property {object | null} error The error. | |
* @property {boolean} pending Whether the call is pending. | |
* @property {any | null} result The result of the asynchronous call. | |
*/ | |
/** @type {State} */ |