Skip to content

Instantly share code, notes, and snippets.

View paullferguson's full-sized avatar

Paul L Ferguson paullferguson

View GitHub Profile
@paullferguson
paullferguson / _.js
Last active November 11, 2020 23:12
A Lodash exercise
(function() {
'use strict';
window._ = {};
// Returns whatever value is passed as the argument. This function doesn't
// seem very useful, but remember it--if a function needs to provide an
// iterator when the user does not pass one in, this will be handy.
_.identity = function(val) {
return val;
/* eslint-disable import/no-unresolved */
import http from 'k6/http';
import { sleep } from 'k6';
export const options = {
vus: 1000,
duration: '2s',
};
@paullferguson
paullferguson / amazon-review-service GET
Last active May 2, 2020 23:13
Response from 127.0.0.1:3003/api/v1/products/017/reviews
{
"reviews": [
{
"profile": {
"name": "Vallie Lang",
"avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/a_harris88/128.jpg"
},
"_id": "5eacb404a5db4880a3b45a14",
"title": "praesentium aut ratione pariatur adipisci repellendus sed blanditiis qui",
"star_rating": 2,
@paullferguson
paullferguson / arrows.scss
Last active August 29, 2015 14:02 — forked from bpainter/arrows.scss
SCSS arrows mixin with option to position
// -----------------------------
// arrows
// -----------------------------
// $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right
// $color: hex, rgb or rbga
// $size: px or em
// $position: true or false - optional (move to overhanging centered edge, message box style)
// @example
// .element{