Skip to content

Instantly share code, notes, and snippets.

James jakwuh

Block or report user

Report or block jakwuh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9485fef622d0fd024892c55d3de3b375
---
import { withBranch, renderComponent } from 'recompose';
withBranch(
props => props.data.loading,
renderComponent(CustomGhostComponent),
);
---
import { withProps, compose } from 'recompose';
import { withGhost } from '@aap/boostrap';
View Moving-Motivators-Letter-v2.00.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakwuh
jakwuh / configured-webpack.txt
Created Sep 8, 2018
2.2 webpack `node` configuration size comparison
View configured-webpack.txt
Hash: 8ebeffa40e80dcf45116
Version: webpack 4.17.1
Child
Hash: 8ebeffa40e80dcf45116
Time: 35ms
Built at: 09/08/2018 2:54:15 PM
Asset Size Chunks Chunk Names
server.js 4.55 KiB main [emitted] main
Entrypoint main = server.js
[./src/entries/server.jsx] 118 bytes {main} [built]
@jakwuh
jakwuh / no-node-externals.txt
Last active Sep 8, 2018
2.1 `webpack-node-externals` build time / size comparison
View no-node-externals.txt
Hash: 83ea41009a25bd992f66e3fbc3208c63a07d0073
Version: webpack 4.17.1
Child
Hash: 83ea41009a25bd992f66
Time: 6713ms
Built at: 09/08/2018 2:25:38 PM
Asset Size Chunks Chunk Names
bundle.js 3.22 MiB main [emitted] main
Entrypoint main = bundle.js
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {main} [built]
@jakwuh
jakwuh / Readme.md
Last active Mar 21, 2019
React 16 and beyond
View Readme.md

React 16 and beyond

This document is created to overview existing React 16+ features. Last updated: 21/03/2019

New fragments syntax

Earlier React supported only single return from the render method:

    render() {
@jakwuh
jakwuh / Readme.md
Last active Sep 27, 2018
Scalable React applications
View Readme.md

Checklist

  • Read about [the story behind react-boilerplate][1]
  • Explore [the structure of react-boilerplate][2]
  • Explore the structure of [scalable-react-boilerplate][3]
  • Read Medium article on [designing large JS applications][4]
  • Read Medium article on [structuring large React applications][5]
  • Read Medium article on [scalable fractal React app structure][13]
  • Read about [feature flags][14]
  • Complete Pluralsight course on [Building Scalable React applications][6]
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Akinator</title>
</head>
<body>
<span id="question"></span>
<br>
<button id="firstButton" type="button" name="button"></button>
View .babelrc
{
"presets": ["env"],
"plugins": [
"transform-typescript",
"transform-class-properties"
]
}
@jakwuh
jakwuh / tcp_nodelay_false
Created Sep 15, 2017
TCP_NODELAY experiment
View tcp_nodelay_false
> tcpdump -i lo0 dst port 1995
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo0, link-type NULL (BSD loopback), capture size 262144 bytes
22:29:03.261714 IP localhost.62949 > localhost.perf-port: Flags [SEW], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925136 ecr 0,sackOK,eol], length 0
22:29:03.361942 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925236 ecr 0,sackOK,eol], length 0
22:29:03.462581 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925336 ecr 0,sackOK,eol], length 0
22:29:03.562713 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925436 ecr 0,sackOK,eol], length 0
22:29:03.664244 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,no
@jakwuh
jakwuh / webpack.config.js
Created Jul 6, 2017
Webpack+React production config
View webpack.config.js
let {resolve} = require('path');
let webpack = require('webpack');
module.exports = {
entry: resolve('index.js'),
output: {
path: resolve('dist'),
filename: 'bundle.js'
},
plugins: [
You can’t perform that action at this time.