Skip to content

Instantly share code, notes, and snippets.

View leroy's full-sized avatar

Leroy Bakker leroy

View GitHub Profile
@leroy
leroy / StatefulFactory.php
Created July 25, 2024 13:34
Make Laravel's eloquent model factories stateful.
<?php
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
trait StatefulFactory
{
/**
* Set factory state, which is not persisted to the database.
*
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?php
interface Component {
}
class ProjectType extends Enum {
const BEDROCK = 'bedrock';
const THEMOSIS = 'themosis';
}
extends Node
signal error
const PORT = 1337
var client: StreamPeerTCP
var stream: PacketPeerStream
@leroy
leroy / httpd-vhost.conf
Created January 2, 2019 13:47
Wildcard vhost
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
@leroy
leroy / Gulpfile.js
Created November 21, 2015 13:41
My Phaser gulp workplace
var gulp = require('gulp');
var gutil = require('gulp-util');
var source = require('vinyl-source-stream');
var buffer = require('gulp-buffer');
var babelify = require('babelify');
var browserify = require('browserify');
var browserSync = require('browser-sync');
var ROOT_PATH = "."
var PHASER_PATH = ROOT_PATH + '/node_modules/phaser/build/';