- read
- read table
- each log
- open
- check block status
- add block to file
- if file complete emit it
- batch put/del
- read table
- open current log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const objectHash = require('node-object-hash'); | |
console.log(objectHash({sort: false}).sort(module.exports)); | |
// Different config content between build 1 and 2 | |
`string-replace-webpack-plugin/loader.js?id=ay3quvgnd7k` | |
`string-replace-webpack-plugin/loader.js?id=z5o2gtqy17d` | |
// Build 1 hashed config content | |
`{context:/Users/zen/Code/webpack/hard-source-string-replace,entry:./index.js,ou |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// function gen() { | |
// return (function(fn) { | |
// const f = function(t, state, begin, end) { | |
// var b = {b: 1}; | |
// var c = {f2: function(t) {return t;}}; | |
// state.left = c.f2(b.b, state, begin, end) * 2; | |
// return state; | |
// }; | |
// return f; | |
// })((function(fn) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="BoxArt animation with MutationObserver"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.column { | |
display: inline-block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = ['a', 'b', 'c', 'd', 'e']; | |
const b = ['b', 'f', 'a', 'g', 'e']; | |
const table = {}; | |
const d = []; | |
var isEqual = (a, b) => { | |
if (a.length === b.length) { | |
let isEqual = true; | |
for (let i = 0; isEqual && i < a.length; ++i) { | |
isEqual = a[i] === b[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<RAnimated name={name} | |
elements={{root: 'root'}} | |
// Build a animation state from the element | |
update={update.object({ | |
x: element => element.getBoundingClientRect().left, | |
y: element => element.getBoundingClientRect().top, | |
width: element => element.getBoundingClientRect().width, | |
height: element => element.getBoundingClientRect().height, | |
opacity: () => 1, | |
})} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Entities = require('html-entities').AllHtmlEntities; | |
const htmlEntities = new Entities(); | |
class InlineCssHtmlWebpackPlugin { | |
apply(compiler) { | |
compiler.plugin('compilation', compilation => { | |
compilation.plugin('html-webpack-plugin-before-html-processing', (htmlPluginData, callback) => { | |
for (let filename of htmlPluginData.assets.css) { | |
const cssSrc = compilation.assets[filename]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a difference of entries in an object when that object | |
// does not equal the new value shallowly. | |
// | |
// Example: | |
// a0 = {a: {b: {c: 3}, d: 4}}; a1 = {a: {b: a0.a.b, d: 5}}; | |
// diff(a0, a1) = {a: {d: 5}}; | |
const diff = (a, b) => { | |
let o; | |
if (a !== b) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Examples | |
// | |
mod examples { | |
fn main() { | |
// Different ways to get a single pwm pin. | |
// | |
// These earlier ones are a bit wasteful as they also create the leds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ScriptAsyncAttrSupportPlugin() {} | |
module.exports = ScriptAsyncAttrSupportPlugin; | |
ScriptAsyncAttrSupportPlugin.prototype.apply = function(compiler) { | |
compiler.plugin('this-compilation', function(compilation) { | |
compilation.mainTemplate.plugin('bootstrap', function(source) { | |
return this.asString([ | |
source, | |
'', |