Inspired by Sam’s personal “minimal” topic list design
- Copy the contents of CSS.sass into Admin > Customize > CSS/HTML > CSS
- Copy the contents of Header.html into Admin > Customize > CSS/HTML > Header
| import { combineReducers } from 'redux' | |
| import { createAction, reduceActions } from './playground'; | |
| export const addTodo = createAction('ADD_TODO', combineReducers({ | |
| todos(state = [], text) { | |
| return [ | |
| { | |
| id: state.reduce((maxId, todo) => Math.max(todo.id, maxId), -1) + 1, | |
| completed: false, | |
| text |
| export const simpleAction = () => { | |
| return { | |
| type: 'SIMPLE_ACTION' | |
| }; | |
| }; | |
| export const complexAction = (arg) => { | |
| return { | |
| type: 'COMPLEX_ACTION', | |
| arg |
| import { createAction, createEffect, reduceActions } from './playground'; | |
| export const addTodo = createAction('ADD_TODO', (state, text) => { | |
| return [ | |
| { | |
| id: state.reduce((maxId, todo) => Math.max(todo.id, maxId), -1) + 1, | |
| completed: false, | |
| text | |
| }, | |
| ...state |
| 1,2c1,3 | |
| < CREATE TYPE check_parent_table AS (parent_table text, count bigint); | |
| < CREATE TABLE part_config ( | |
| --- | |
| > CREATE SCHEMA partman; | |
| > CREATE TYPE partman.check_parent_table AS (parent_table text, count bigint); | |
| > CREATE TABLE partman.part_config ( | |
| 21,22c22,23 | |
| < CREATE INDEX part_config_type_idx ON @[email protected]_config (type); | |
| < SELECT pg_catalog.pg_extension_config_dump('part_config', ''); |
| // Lab setup | |
| var Code = require('code'); | |
| var Lab = require('lab'); | |
| var lab = exports.lab = Lab.script(); | |
| var describe = lab.describe; | |
| var it = lab.it; | |
| var before = lab.before; | |
| var after = lab.after; | |
| var expect = Code.expect; |
| Error: write after end | |
| at writeAfterEnd (_stream_writable.js:130:12) | |
| at Protocol.Writable.write (_stream_writable.js:178:5) | |
| at write (_stream_readable.js:583:24) | |
| at flow (_stream_readable.js:592:7) | |
| at Socket.pipeOnReadable (_stream_readable.js:624:5) | |
| at Socket.EventEmitter.emit (events.js:92:17) | |
| at emitReadable_ (_stream_readable.js:408:10) | |
| at emitReadable (_stream_readable.js:404:5) | |
| at readableAddChunk (_stream_readable.js:165:9) |
Inspired by Sam’s personal “minimal” topic list design
| var Wreck = require('wreck'); | |
| function collectData(count) { | |
| var results = {}; | |
| var called = 0; | |
| var index = 0; | |
| return function (url) { | |
| results[url] = { | |
| url: url, | |
| index: index |
| var Hapi = require('hapi'); | |
| var cv = require('opencv'); | |
| var cam = new cv.VideoCapture(0); | |
| var server = Hapi.createServer(9999); | |
| server.route({ | |
| path: '/cam.jpg', | |
| method: 'GET', |
| $ node new-magicForest.js 2017 2055 2006 | |
| total forests: 6128 | |
| { goats: 0, wolves: 0, lions: 4023 } | |
| total time: 20ms |