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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Redux Undo Filter Test</title> | |
</head> | |
<body> | |
<p>See info in JS console</p> | |
<script src="store.js"></script> | |
</body> |
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
function unirest_prom(unirest_req, always_resolve) { | |
// Returns a Promise by wrapping a unirest.Request object in | |
// a Promise that immediately calls `.end(...)` | |
// | |
// Params: | |
// | |
// * unirest_req - unirest.Request - any unirest Request object that has | |
// not yet had `.end(...)` called on it | |
// * always_resolve - bool (optional) - defaults to `false`, iff `true` then | |
// the Promise always resolves--even when the request fails |
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
declare module "extract-props" { | |
export interface ExtractedProps { | |
spreadProps: object; | |
customProps: object; | |
} | |
export default function extractProps(props: object, keys: string[]): ExtractedProps; | |
} |
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 React from 'react'; | |
export default ({ | |
fill = '#666666', | |
width = 52, | |
height = 12, | |
scale = 1, | |
style = {} | |
}) => ( | |
<svg |
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
#!/usr/bin/env bash | |
DIMS_SHORT="886:1576:0:104" | |
DIMS_TALL="886:1816:0:104" | |
INFILE= | |
OUTFILE= | |
DIMS="$DIMS_TALL" | |
print_usage() { |
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 csv | |
def run(infile, outfile, is_tsv=False, dry_run=False): | |
dialect = 'excel-tab' if is_tsv else 'excel' | |
reader = csv.DictReader(infile, dialect=dialect) | |
writer = None | |
is_first = True | |
for row in reader: |
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
const AWS = require('aws-sdk'); | |
const PREFIX = 'amplify-builds/'; | |
const DEFAULT_KEEP_N = 5; | |
const DEFAULT_DRY_RUN = false; | |
const s3 = new AWS.S3(); | |
// ## Main |
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 React from 'react'; | |
export const Plural = ({ | |
num, | |
text, | |
pluralText, | |
pluralSuffix, | |
singularSuffix | |
}: { | |
num: number; |
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
const chalk = require('chalk'); | |
const fs = require('fs'); | |
const http = require('http'); | |
const https = require('https'); | |
const yargs = require('yargs'); | |
// Configuration | |
const DEFAULT_PARCEL_PORT = 4321; |
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 { generatePath } from 'react-router'; | |
// ## Route URL | |
export default class RouteUrl<P extends { [K in keyof P]?: string }> { | |
constructor(public routePath: string) {} | |
asPath(params: { [K in keyof P]: string | number | boolean }) { | |
return generatePath(this.routePath, params); | |
} |