Skip to content

Instantly share code, notes, and snippets.

@jonmbake
jonmbake / building_enzyme_for_amd.md
Last active July 29, 2018 16:49
Building Enzyme for Use in Legacy Module Loading Systems (AMD e.g. RequireJS, SES, UMD)

This describes how to build enzyme as a UMD (Universal Module Definition) module so it can be used in systems with legacy module loaders like RequireJS.

Browserify with the --standalone option will be used to build the standalone Enzyme UMD module. This is a good post describing Browserify's --standalone option: http://www.forbeslindesay.co.uk/post/46324645400/standalone-browserify-builds.

  1. Install npm dependencies
npm install --save-dev browserify
npm install --save-dev enzyme
npm install --save-dev react
@jonmbake
jonmbake / Dockerfile
Created August 29, 2018 17:26
AWS CodeBuild Ruby 2.4.0 Postgres 9.4 Dockerfile
FROM ubuntu:14.04.5
ENV DOCKER_BUCKET="download.docker.com" \
DOCKER_VERSION="17.09.0-ce" \
DOCKER_CHANNEL="stable" \
DOCKER_SHA256="a9e90a73c3cdfbf238f148e1ec0eaff5eb181f92f35bdd938fd7dab18e1c4647" \
DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" \
DOCKER_COMPOSE_VERSION="1.21.2" \
GITVERSION_VERSION="3.6.5"
@jonmbake
jonmbake / local.yml
Last active August 8, 2019 20:28
Ansible Playbook for Local Provisioning of Matomo on Ubuntu 18.04
- hosts: local
connection: local
become: yes
become_user: root
vars_files:
- local_vars.yml
pre_tasks:
- raw: apt -y update && apt install -y python-apt
tasks:
- name: Install Apache, PHP, MySQL, Unzip
@jonmbake
jonmbake / Vagrantfile
Created August 6, 2019 20:30
Vagrantfile for Local Provisioning of Matomo on Ubuntu 18.04
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision :ansible_local do |ansible|
ansible.limit = 'local'
ansible.inventory_path = 'hosts'
ansible.playbook = 'local.yml'
end
@jonmbake
jonmbake / init-website.sh
Last active December 28, 2022 04:34
A script to create a SSL-enabled, custom domain, website with Github pages and Cloudflare.
#!/usr/bin/env bash
# ##################################################
# Creates a SSL-enabled, custom domain, website with Github Pages and Cloudflare.
#
# USAGE: ./init-website.sh
# AUTHOR: Jon Bake <jonmbake@gmail.com>
# LICENSE: MIT
# VERSION: 1.0.0
#
@jonmbake
jonmbake / gist:3edec101e697c96aafc48066731bbb7d
Last active January 22, 2023 04:22
Die With Zero: Getting All You Can from Your Money and Your Life by Bill Perkins Kindle Highlights
Your Kindle Notes For:
Die With Zero: Getting All You Can from Your Money and Your Life
Bill Perkins
Last accessed on Sunday January 15, 2023
23 Highlight(s) | 0 Note(s)
Page: 3
What’s the best way to allocate our life energy before we die?
@jonmbake
jonmbake / test.sh
Created April 17, 2023 00:37
Fusionauth terraform provider ci start
#!/bin/bash
# goreleaser build --snapshot --clean
curl -o docker-compose.yml https://raw.githubusercontent.com/FusionAuth/fusionauth-containers/master/docker/fusionauth/docker-compose.yml
curl -o .env https://raw.githubusercontent.com/FusionAuth/fusionauth-containers/master/docker/fusionauth/.env
awk '
/SEARCH_TYPE: elasticsearch/ {print; print " FUSIONAUTH_APP_KICKSTART_FILE: ${FUSIONAUTH_APP_KICKSTART_FILE}"; next}
/fusionauth_config:\/usr\/local\/fusionauth\/config/ {print; print " - ./kickstart:/usr/local/fusionauth/kickstart"; next}
{print}