Skip to content

Instantly share code, notes, and snippets.

View alexbrownphotobox's full-sized avatar
🏠
Working from home

Alex Brown alexbrownphotobox

🏠
Working from home
View GitHub Profile
@alexbrownphotobox
alexbrownphotobox / aws-cli-stepfunctions-commands-starter.md
Created January 5, 2024 15:15 — forked from yokada/aws-cli-stepfunctions-commands-starter.md
AWS Cli StepFunctions commands starter in local with docker

@see For running aws stepfunctions local in docker https://gist.github.com/yokada/5e7ff39b91caff0eb6446a3e41465c3d

Create State Machine

$ aws stepfunctions create-state-machine \
  --endpoint http://localhost:18083 \
  --definition "$(gist -r 799bc111ce4ea7801b2f251e21177aec)" \
  --name WaitExecution \
  --role-arn arn:aws:iam::012345678901:role/DummyRole \
@alexbrownphotobox
alexbrownphotobox / brew-dnsmasq.md
Created October 7, 2019 20:06 — forked from davebarnwell/brew-dnsmasq.md
install dnsmasq with brew

Install dnsmasq and configure for *.dev.local domains

$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf

Reload configuration and clear cache

# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/

$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist

@alexbrownphotobox
alexbrownphotobox / pipe.js
Last active May 9, 2019 17:30
Functional Composition - Compose
const pipe = (...fns) => payload =>
fns.reduce(
(currentValue, currentFunction) => currentFunction(currentValue),
payload
);
const userValue = {
name: "Main name",
title: "Main title",
projects: [
@alexbrownphotobox
alexbrownphotobox / compose.js
Last active May 9, 2019 17:29
Functional Composition - Compose
const compose = (...fns) => payload =>
fns.reduceRight(
(currentValue, currentFunction) => currentFunction(currentValue),
payload
);
const userValue = {
name: "Main name",
title: "Main title",
projects: [