Skip to content

Instantly share code, notes, and snippets.

View alganet's full-sized avatar

Alexandre Gomes Gaigalas alganet

  • São Paulo, SP, Brazil
View GitHub Profile
@nelsonsar
nelsonsar / PosixErrorCodes.php
Created February 11, 2015 01:59
Posix error codes as class of constants. From here: http://fxr.watson.org/fxr/source/sys/errno.h
<?php
class PosixErrorCode
{
const EPERM = 1; /* Operation not permitted */
const ENOENT = 2; /* No such file or directory */
const ESRCH = 3; /* No such process */
const EINTR = 4; /* Interrupted system call */
const EIO = 5; /* Input/output error */
const ENXIO = 6; /* Device not configured */
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active April 23, 2024 19:48
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@alganet
alganet / exists.cmd
Last active November 19, 2018 14:21
sh/bat hybrid that checks available commands. Despite its hackish look, it was tested under Windows XP, wine, ksh, zsh, dash and bash.
: ::\
@echo off
rem () ( command -v $1 >/dev/null 2>&1; return $? )
rem : "Usage sh: $ sh exists.cmd ls && echo exists "
rem : "Usage bat: > exists.cmd notepad "
rem : " > echo %ErrorLevel% "
rem $1 <<REM
:exists
@19WAS85
19WAS85 / powershell-web-server.ps1
Last active April 2, 2024 00:08
A simple web server built with powershell.
# This is a super **SIMPLE** example of how to create a very basic powershell webserver
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity.
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
# Start the Http Server