// Option.ts
// definition
export class None {
readonly tag: 'None' = 'None'
/*eslint-disable no-alert */ | |
//////////////////////////////////////////////////////////////////////////////// | |
// Exercise: | |
// | |
// Using context, implement the <Form>, <SubmitButton>, and <TextInput> | |
// components such that: | |
// | |
// - Clicking the <SubmitButton> "submits" the form | |
// - Hitting "Enter" while in a <TextInput> submits the form | |
// - Don't use a <form> element, we're intentionally recreating the |
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your o
#!/usr/bin/env bash | |
set -o pipefail # If you pipe one command into another, fail the whole lot if any fail | |
set -e # fail if there are any errors in the script | |
set -u # fail if you use an uninitialized variable | |
# Warn about the dire consequences of this action | |
read -r -p "THIS WILL WIPE OUT ANY UNCOMMITTED CHANGES - control-c to stop" yn | |
HEAD=$(git rev-parse HEAD) # Save where you're up to | |
git reset --hard "$HEAD" # Avoid using uncommitted changes to build the site |
/* | |
* Given an array of pairs | |
* such as this | |
* `['a-b','b-c']` | |
* | |
* and we wish to convert to | |
* `{ | |
* a: b, | |
* b: c | |
* }` |
[Flow][] static type checker is a wonderful attempt to bring [algebric data types][] to JS. It is still fairly new project and there for has few WTFs that can pull you down the rabbit hole. This document is attempt to document things that may seem like a WTF from the perspective of JS developer who tries to employ static type checker, or in other words, some items on the list may be very subjective & based on the background of the writer.
It is very likely that one will wind up using [Polymorphic functions][] to solve a more general problem. And if you define type alias for such a function you may be puzzled what is the right syntax should be used for such type definition.
Let's start with:
Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);
2) get requireAccess func => bindCheckAuth to redux