Skip to content

Instantly share code, notes, and snippets.

Avatar

Dac Chartrand connerbw

View GitHub Profile
@connerbw
connerbw / .bashrc
Created June 13, 2022 18:17
Install Upgraded GNU Bash on a Macbook Pro
View .bashrc
# Forked from the Ubuntu 22.04 /etc/skel folder
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
@connerbw
connerbw / swagit.php
Last active March 30, 2023 16:20 — forked from ls-dac-chartrand/swagit.php
Swag It: Reverse engineer Swagger-PHP annotations from an existing JSON payload
View swagit.php
<?php
// -------------------------------------------------------------------------------------
// Add your JSON in the $input to generate Swagger-PHP annotation
// Inspired by: https://github.com/Roger13/SwagDefGen
// HOWTO:
// php -S localhost:8888 -t .
// http://localhost:8888/swagit.php
// -------------------------------------------------------------------------------------
@connerbw
connerbw / Dockerfile
Last active August 13, 2020 12:21
PHP & Go, Together At Last
View Dockerfile
# -----------------------------------------------------------------------------
# Build RoadRunner
# -----------------------------------------------------------------------------
FROM golang:1.14 as builder
ENV CGO_ENABLED=0
ENV GO111MODULE=on
RUN apt-get update
WORKDIR /go/src/roadrunner
@connerbw
connerbw / EventEmitter.php
Last active November 4, 2022 19:52
Refactor Your Slow Form Using PHP Generators and Event Streams
View EventEmitter.php
<?php
/**
* @license GPLv3 (or any later version)
* @see http://kizu514.com/blog/refactor-your-slow-form-using-php-generators-and-event-streams/
*/
namespace KIZU514;
class EventEmitter
{