This file contains hidden or 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
| // Adds a lovely fade in of the modal | |
| // and a gentle slide-down of the modal content | |
| class Demo extends React.Component { | |
| state = { showDialog: false }; | |
| render() { | |
| return ( | |
| <div> | |
| <button onClick={() => this.setState({ showDialog: true })}> | |
| Show Dialog | |
| </button> |
This file contains hidden or 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 numpy as np | |
| import matplotlib.pyplot as plt | |
| import scipy.stats as scs | |
| def z_val(sig_level=0.05, two_tailed=True): | |
| """Returns the z value for a given significance level""" | |
| z_dist = scs.norm() | |
| if two_tailed: | |
| sig_level = sig_level/2 | |
| area = 1 - sig_level |
This file contains hidden or 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
| const puppeteer = require("puppeteer"); | |
| let waitTime = 5 * 1000; | |
| async function testAjax() { | |
| const url = "https://www.notion.so/Test-page-all-c969c9455d7c4dd79c7f860f3ace6429" | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| await page.setRequestInterception(true); | |
| // those we don't want to log because they are not important |
This file contains hidden or 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
| const Brakes = require('brakes'); | |
| const Async = require('crocks/Async'); | |
| const fetch = require('node-fetch'); | |
| const assoc = require('crocks/helpers/assoc'); | |
| const compose = require('crocks/helpers/compose'); | |
| const composeK = require('crocks/helpers/composeK'); | |
| const defaultTo = require('crocks/helpers/defaultTo'); | |
| const propOr = require('crocks/helpers/propOr'); | |
| const and = require('crocks/logic/and'); |
This file contains hidden or 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
| Hello. how are you? | |
| Hello. how are you? | |
| Hello. how are you? | |
| Hello. how are you? | |
| Hello. how are you? |
This file contains hidden or 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 { contains, propEq, filter, flip, propSatisfies, isEmpty, compose, head, not } from 'ramda' | |
| import { isFunction, isArray } from 'crocks' | |
| // Query = Function | Array | |
| // Set = [a] | |
| // defineSet :: Query -> a -> Set | |
| export const defineSet = q => x => | |
| (isFunction(q) && q(x)) || (isArray(q) && contains(x)(q)) ? [ x ] : [] |
You should have the following completed on your computer before the workshop:
- Have Node.js installed on your system. (Recommended: Use nvm.)
- Unfortunately, you'll need to be on Node 9.x or earlier. Dependencies are hard and one of the dependencies of one of our dependencies is set to not allow Node 10.x.
- Install
yarnwithbrew install yarn.
- Create an AWS account. (This will require a valid credit card.)
- Install multi-factor authentication app (e.g. Authy, Google Authenticator, Duo).
- Install the AWS CLI. (
brew install awsclishould do the trick. Otherwise, you'll need Python and PIP, which you can install usingbrew install python.)
You can run either of the following snippets in your terminal to generate a markdown list of your VS Code extensions.
code --list-extensions | awk '{ print "* [" $1 "](https://marketplace.visualstudio.com/items\?itemName\=" $1 ")" }'
npx https://gist.github.com/elijahmanor/7f9762a4c2296839ad33e33513e88043
NOTE: You can append | pbcopy to either of the above commands to pipe the output to your Mac's copy/paste buffer.
Some things that are "better" with this BetterPromise implementation:
-
BetterPromise # then(..)accepts aBetterPromise(orPromise) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.var p = BetterPromise.resolve(42); var q = Promise.resolve(10); p.then(console.log).then(q).then(console.log);