In addition to the Storybook for React setup, you'll also need to install these packages:
npm i -D @babel/core babel-loader css-loader style-loader
| "use client"; | |
| import React from "react"; | |
| import { View, StyleSheet, Animated, Easing, ViewStyle } from "react-native"; | |
| const BASE_COLORS = { | |
| dark: { primary: "rgb(17, 17, 17)", secondary: "rgb(51, 51, 51)" }, | |
| light: { | |
| primary: "rgb(250, 250, 250)", | |
| secondary: "rgb(205, 205, 205)", |
| import React, {useEffect} from "react"; | |
| import {StyleProp, StyleSheet, TouchableOpacity, TouchableOpacityProps, ViewProps, ViewStyle} from "react-native"; | |
| import Animated, { | |
| interpolate, | |
| useAnimatedStyle, | |
| useSharedValue, | |
| withTiming, | |
| Easing, | |
| Extrapolate, | |
| interpolateColor, AnimateProps, |
| const admin = require('firebase-admin'); | |
| // expects the environment variable GOOGLE_APPLICATION_CREDENTIALS | |
| const serviceAccount = require(process.env.GOOGLE_APPLICATION_CREDENTIALS); | |
| const credential = admin.credential.cert(serviceAccount); | |
| const PROJECT_ID = '<FIREBASE_PROJECT_ID>'; | |
| const app = admin.initializeApp({ | |
| credential: credential |
| /* | |
| Google Drive API: | |
| Demonstration to: | |
| 1. upload | |
| 2. delete | |
| 3. create public URL of a file. | |
| required npm package: googleapis | |
| */ | |
| const { google } = require('googleapis'); |
In addition to the Storybook for React setup, you'll also need to install these packages:
npm i -D @babel/core babel-loader css-loader style-loader
| import { useState, useEffect } from 'react'; | |
| // Usage | |
| function App() { | |
| // Call our hook for each key that we'd like to monitor | |
| const happyPress = useKeyPress('h'); | |
| const sadPress = useKeyPress('s'); | |
| const robotPress = useKeyPress('r'); | |
| const foxPress = useKeyPress('f'); |
| year | week | feat | fix | docs | style | refactor | test | chore | Dev 1 | Dev 2 | Dev 3 | Dev 4 | Dev 5 | Dev 6 | Dev 7 | Dev 8 | Dev 9 | Dev 10 | Dev 11 | Dev 12 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2016 | 43 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | |
| 2016 | 44 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | |
| 2016 | 45 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | |
| 2016 | 51 | 2 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 0 | 0 | |
| 2016 | 52 | 5 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 0 | 0 | |
| 2016 | 53 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | |
| 2017 | 1 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 0 | 0 | |
| 2017 | 2 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | |
| 2017 | 3 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 |
| import React from 'react'; | |
| const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children; | |
| const Header = ({shouldLinkToHome}) => ( | |
| <div> | |
| <ConditionalWrap | |
| condition={shouldLinkToHome} | |
| wrap={children => <a href="/">{children}</a>} | |
| > |
Updating Neil Freeman’s Block to d3.v4 that was riffing on the State Capitals Voronoi from Jason Davies, and using his spherical voronoi script.
| # BREW with xcode | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| sudo xcodebuild | |
| brew update | |
| brew install caskroom/cask/brew-cask | |
| # BROWSERS | |
| brew cask install firefox google-chrome | |
| # JAVA |