Skip to content

Instantly share code, notes, and snippets.

View dac514's full-sized avatar

Dac Chartrand dac514

  • Montréal, Québec
View GitHub Profile
@dac514
dac514 / swagit.php
Created February 10, 2024 02:17 — forked from ls-dac-chartrand/swagit.php
Swag It: Reverse engineer Swagger-PHP annotations from an existing JSON payload
<?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
// -------------------------------------------------------------------------------------
@dac514
dac514 / Dockerfile
Last active August 13, 2020 12:21
PHP & Go, Together At Last
# -----------------------------------------------------------------------------
# Build RoadRunner
# -----------------------------------------------------------------------------
FROM golang:1.14 as builder
ENV CGO_ENABLED=0
ENV GO111MODULE=on
RUN apt-get update
WORKDIR /go/src/roadrunner
@dac514
dac514 / EventEmitter.php
Last active November 4, 2022 19:52
Refactor Your Slow Form Using PHP Generators and Event Streams
<?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
{