a recursive function to calculate compounding discount
discount rate: $1.50
gas surcharge: $0.35
| stops | discount | cost | per stop |
|---|
| import React, { useState } from 'react' | |
| // assuming you have a custom fallback for a given param: id | |
| const fallback = id => `https://fallback.distro.com/${id}.png` | |
| const image = id => `https://images.distro.com/${id}.png` | |
| export default props => { | |
| const { click, id } = props | |
| import React, { memo } from 'react' | |
| import { | |
| Checkbox, | |
| Button, | |
| FormControlLabel, | |
| TableBody, | |
| TableCell, | |
| TableFooter, | |
| TableHead, | |
| TableRow, |
| import pg from 'pg' | |
| import EventEmitter from 'events' | |
| import util from 'util' | |
| /* | |
| initialize postgres client... | |
| */ | |
| function PgEmitter() { | |
| EventEmitter.call(this) | |
| } |
| #!/bin/bash | |
| # usage ./create.sh your-bucket-name | |
| # $1=your-bucket-name | |
| # create a public bucket for images (your-bucket-name) | |
| # create a logging bucket (s3-your-bucket-name) | |
| # create bucket policy json: your-bucket-name.json | |
| # set bucket policy | |
| # create cloudfront config json: your-bucket-name-cf.json | |
| # create a cloudfront distribution for the bucket using the logging bucket for logs |
| import React, { Component } from 'react' | |
| import TextField from 'material-ui/TextField' | |
| /* | |
| Using Material Design: | |
| - set id to state key | |
| - use a single handler to update state for n inputs | |
| - no need to use formik or redux forms every time | |
| */ | |
| export default class extends Component { |