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
| docker images | |
| docker search <name*> | |
| docker inspect <image_name> | |
| docker pull <name:tag,name,id> | |
| docker ps # what is running | |
| docker ps -a # what containers ran in the past | |
| docker run -it # interactive, terminal | |
| docker run -d # run in background | |
| docker run -d <some_cmd> -e <some_script> # execute | |
| docker attach <container_name> # attach to process of running container |
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
| <script> | |
| window.Promise || document.write('<script src="https://unpkg.com/es6-promise@3.2.1/dist/es6-promise.min.js"><\/script>'); | |
| window.fetch || document.write('<script src="https://unpkg.com/whatwg-fetch@1.0.0/fetch.js"|script src="https://unpkg.com/whatwg-fetch@1.0.0/fetch.js"><\/script>'); | |
| </script> |
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 urls = `/home/anti-depressants/xanax | |
| /home/heart/lipitor | |
| /home/heart/atorvastatin | |
| /home/heart/aspirin | |
| /drugs/nasal/flonase | |
| /drugs/topical | |
| /drugs/routes/oral/tablets | |
| /drugs/routes/nasal/flonase`; | |
| const parseUrl = (url) => { |
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
| // gulp/tasks/perf.js | |
| import {task as perfTask} from '@hfa/perf' | |
| export default perfTask(/* any options */) | |
| // perf.config.js | |
| export default { | |
| name: string // SpeedCurve project name | |
| page: string // Page to test | |
| env: string // "dev" or "prod" |
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
| gen @hfa/perf # generate a perf.config.js file in project root | |
| @hfa/perf --page /bleep # run SpeedCurve tests against /bleep route for your project | |
| @hfa/perf --env dev --page * # run SpeedCurve tests for all pages on "dev" | |
| @hfa/perf --env prod --page * # run SpeedCurve tests for all pages on "prod" |
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 path from 'path'; | |
| import glob from 'globby'; | |
| import {readJson, outputJson} from 'fs-extra'; | |
| const cwd = process.cwd(); | |
| const read = (fp) => { | |
| return new Promise((res, rej) => { | |
| readJson(fp, (err, data) => { | |
| if (err) return rej(err); |
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 flatten = (() => { | |
| function flatten(arr, list) { | |
| if (Array.isArray(arr)) { | |
| arr.forEach(item => flatten(item, list)) | |
| } else { | |
| list.push(arr) | |
| } | |
| return list | |
| } |
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
| // function run(gen) { | |
| // const it = gen() | |
| // return new Promise((res, rej) => { | |
| // function next(err, data) { | |
| // let nextData; | |
| // if (err !== undefined && err !== null) { | |
| // nextData = it.throw(err) | |
| // } else { |
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
| # i-27794fa1 | |
| https://docs.google.com/a/hillaryclinton.com/document/d/1Ofo4XOQAoKZozq9yS3p62xmh-kf18d0HVITVwn_jys8/edit?usp=sharing | |
| ---------------4 workers on 4 cores----------------------- | |
| ▶ wrk -c 50 -t 2 -d 1m -R 50 http://10.4.111.156/ | |
| Running 1m test @ http://10.4.111.156/ | |
| 2 threads and 50 connections | |
| Thread calibration: mean lat.: 5535.371ms, rate sampling interval: 12836ms | |
| Thread calibration: mean lat.: 5376.000ms, rate sampling interval: 19415ms |
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
| Mocha { | |
| files: [ '/Users/davidfox-powell/dev/sos-server/test/unit/server-middleware-spec.js' ], | |
| options: { reporterOptions: {}, globals: [] }, | |
| suite: | |
| Suite { | |
| title: '', | |
| ctx: {}, | |
| suites: [], | |
| tests: [], | |
| pending: false, |