Skip to content

Instantly share code, notes, and snippets.

@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}
@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 / 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 / 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 / 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 / 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 / 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 / gist:2eaa48f71b5f95a12ba3
Last active December 21, 2015 18:23
Creating a Checkstyle-Tester DIFF-REPORT steps taken
  1. Did a clean/install of checkstyle before my change
cd ~/projects/git/checkstyle
git checkout c0a664c25194ef7be3b59ce200a9fcd88fbc5c2d
mvn clean install
  1. Cloned checkstyle-contribution and cd'ed cd ~/projects/git/checkstyle-contribution/
  2. Uncommented all projects in projects-to-test-on.properties
@jonmbake
jonmbake / sendmail.php
Created December 19, 2015 02:50
Without env. variables and without SMTP authentication
?php
/**
* Sets error header and json error message response.
*
* @param String $messsage error message of response
* @return void
*/
function errorResponse ($messsage) {
header('HTTP/1.1 500 Internal Server Error');
die(json_encode(array('message' => $messsage)));
@jonmbake
jonmbake / contact-form.js
Created October 4, 2015 17:15
Passing in Global jQuery Variable to contact-form's self executing function
(function ($) {
var contactFormUtils = {
isValidEmail: function (email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
},
clearErrors: function () {
$('#emailAlert').remove();
$('#feedbackForm .help-block').hide();
$('#feedbackForm .form-group').removeClass('has-error');