Skip to content

Instantly share code, notes, and snippets.

View michaelbunch's full-sized avatar

Michael Bunch michaelbunch

View GitHub Profile
@michaelbunch
michaelbunch / UploadedFileTestHelper.php
Created September 27, 2019 19:31
Laravel test helper for creating a temporary file upload with contents.
<?php
namespace Tests\Helpers;
class UploadedFileTestHelper
{
/**
* Create a fake file upload with the contents
*
* @param mixed $contents The contents of the temporary file
@michaelbunch
michaelbunch / docker-compose.yml
Created August 1, 2019 18:45
Ngrok Docker-Compose
version: '3.7'
services:
nginx:
image: nginx:latest
ngrok:
image: fnichol/ngrok
environment:
HTTP_PORT: nginx:80
ports:
@michaelbunch
michaelbunch / docker-compose.yaml
Last active December 7, 2021 10:04
Local Docker Services
version: '3.7'
x-defaults: &defaults
restart: unless-stopped
networks:
- learninghouse
services:
# Nginx Reverse Proxy
# https://github.com/jwilder/nginx-proxy
@michaelbunch
michaelbunch / docker-compose.yaml
Created October 11, 2018 19:02
Docker system services
# -----------------------------------------------------------------------------
# Run various servers so they can be locally accessible to the host computer.
# Since the ports used below are default to their respective services you
# could have conflicts with other local instances.
# -----------------------------------------------------------------------------
version: '3.4'
x-defaults: &defaults
restart: unless-stopped
@michaelbunch
michaelbunch / docker-flush.sh
Created June 28, 2018 18:54
Give Docker the deep clean it needs.
#!/bin/bash
echo "Flushing Docker... 🚽💦"
echo "Stopping container instances..."
docker stop $(docker ps -a -q) > /dev/null 2>&1
echo "Removing container instances..."
docker rm $(docker ps -a -q) > /dev/null 2>&1
@michaelbunch
michaelbunch / php.md
Last active February 1, 2019 13:01
Development Resources
@michaelbunch
michaelbunch / Task 2.md
Last active May 31, 2018 16:20
Interview Development Task - Part 2

Interview Development Task - Part 2

Task

Your users love the service but would like some new features. The bookmark list can get very long, so they only want to see 20 bookmarks per page. It can also be difficult to find bookmarks created by the user, so they need filter to only show the logged in user's bookmarks. Lastly, users would like the ability to create private bookmarks only they can see.

Estimated time to complete: 1 - 2 hours

@michaelbunch
michaelbunch / readme.md
Last active May 29, 2018 21:01
Interview Development Task

Interview Development Task

Task

Your users would like a service for sharing bookmarks with one other. The service should have authentication to keep the bookmarks private to only registered users. Once authenticated all bookmarks are visible by all users. A user can post a new bookmark for all to see, but only that user can edit or delete the bookmark. All users like the to see the bookmarks in alphabetical order by title. New users can join the service via a public registration page.

Estimated time to complete: 3 - 4 hours

@michaelbunch
michaelbunch / docker-compose.yml
Last active September 12, 2018 15:52
Docker-compose for local Laravel development
version: '2'
services:
app:
image: learninghouse/nginx-phpfpm:7.1
volumes:
- ./:/app
ports:
- "8000:80"
links:
@michaelbunch
michaelbunch / Vagrantfile
Last active December 11, 2015 16:33
Install latest Docker and tools on Ubuntu Trusty
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "pwap"
config.vm.network "private_network", ip: "192.168.10.10"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]