Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
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
# export notes from the Bear db to markdown files | |
import sqlite3 | |
BEAR_DB = '/Users/<your username>/Library/Containers/net.shinyfrog.bear/Data/Library/Application Support/net.shinyfrog.bear/database.sqlite' | |
EXPORT_DIR = '<set an export directory>' | |
conn = sqlite3.connect(BEAR_DB) | |
c = conn.cursor() | |
for row in c.execute('SELECT ZTITLE, ZTEXT FROM ZSFNOTE'): |
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
import type { HostConfig, Reconciler } from 'react-fiber-types'; | |
import type { ReactNodeList } from 'react-fiber-types/ReactTypes'; | |
import DOMPropertyOperations from './DOMPropertyOperations'; | |
import type { | |
Props, | |
Container, | |
Instance, | |
TextInstance, | |
OpaqueHandle, |
// Explains Dead Letter Queue + bad event handling + blocking
-
https://stackoverflow.com/questions/32501985/amazon-kinesis-aws-lambda-retries
-
https://aws.amazon.com/blogs/compute/amazon-kinesis-firehose-data-transformation-with-aws-lambda/
// You set the amount of events(batchsize) + guarantees of concurrency per shard+ plus key only active in 1 shard at the time
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
// only polyfill .finished in browsers that already support animate() | |
if (document.body.animate) { | |
// Chrome does not seem to expose the Animation constructor globally | |
if (typeof Animation === 'undefined') { | |
window.Animation = document.body.animate({}).constructor; | |
} | |
if (Animation.prototype.finished === undefined) { | |
Object.defineProperty(Animation.prototype, 'finished', { |
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
export ZPLUG_HOME=/usr/local/opt/zplug | |
source $ZPLUG_HOME/init.zsh | |
# Plugins | |
zplug "lib/completion", from:oh-my-zsh | |
zplug "lib/directories", from:oh-my-zsh | |
zplug "lib/functions", from:oh-my-zsh | |
zplug "plugins/brew-cask", from:oh-my-zsh | |
zplug "plugins/brew", from:oh-my-zsh | |
zplug "plugins/composer", from:oh-my-zsh |
OlderNewer