Skip to content

Instantly share code, notes, and snippets.

Avatar

Dac Chartrand connerbw

View GitHub Profile
@connerbw
connerbw / swagit.php
Created Mar 12, 2021 — 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 Aug 13, 2020
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 Jan 28, 2021
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
{