George Song (Twitter: @zukefresh, Github: @gsong)
- Need React >= v16.3.0
- State: Component → Context → Unstated → Redux/MobX/(etc)
- Two parts:
<Provider />and<Consumer />
George Song (Twitter: @zukefresh, Github: @gsong)
<Provider /> and <Consumer />Joel Griffith - Sr. Dev @ AppNexus (Twitter: @griffith_joel)
Sample repo: joelgriffith/phantompain
| #!/bin/bash | |
| # A pre-commit hook to help you do the right thing (tm) | |
| set -e | |
| changed-files () { | |
| git diff HEAD --name-only "$@" | |
| } |
| *.swp |
| const expiresIn = (timeoutMs, promise, msg = 'Promise timed out') => | |
| new Promise((resolve, reject) => { | |
| const timerId = setTimeout(reject, timeoutMs, msg); | |
| promise.then((result) => { | |
| clearTimeout(timerId); | |
| resolve(result); | |
| }); | |
| }); | |
| const buffer = require('buffer'); | |
| const crypto = require('crypto'); | |
| // Demo implementation of using `aes-256-gcm` with node.js's `crypto` lib. | |
| const aes256gcm = (key) => { | |
| const ALGO = 'aes-256-gcm'; | |
| // encrypt returns base64-encoded ciphertext | |
| const encrypt = (str) => { | |
| // The `iv` for a given key must be globally unique to prevent |
| #! /bin/bash | |
| # | |
| # Add a teammate's public key(s) to authorized_keys via the github API | |
| # | |
| # Usage: | |
| # | |
| # GITHUB_LOGIN=rjz ./add_github_keys.sh | |
| # | |
| # PREFIX for authorized_keys entries (default: attach to running |
| javascript:(function (ta) { | |
| const message = `Thanks for reaching out! | |
| \n\n | |
| I’m unfortunately not open to new opportunities at this time, but I’m certainly wishing you all the best in your search! | |
| \n\n | |
| RJ`; | |
| if (!(ta && ta.length === 1)) { | |
| alert('UI has changed...'); | |
| } else { |
| #!/bin/bash | |
| # Usage: | |
| # | |
| # $ metrics.sh > dynamo_tables.txt | |
| # | |
| # $ cat dynamo_tables.txt \ | |
| # | tr : ' ' \ | |
| # | sed 's/\./ /' \ | |
| # | sed 's/ =//' \ |