Skip to content

Instantly share code, notes, and snippets.

View rizqidjamaluddin's full-sized avatar

Rizqi Djamaluddin rizqidjamaluddin

  • Jakarta, Indonesia
View GitHub Profile
@rizqidjamaluddin
rizqidjamaluddin / Schema
Created October 16, 2014 11:31
An experimental idea of an endpoint schema with translation logic
class MessageSchema extends EndpointSchema
{
public function bridge () {
return [
'message' => new Parameter([
'get' => function($e) {
return $e->getMessage();
}
'set' => function($i, $e) {
return $e->setMessage($i);
@rizqidjamaluddin
rizqidjamaluddin / gist:72f5cc7fc22f336dac7a
Last active August 29, 2015 14:05
Experimental cross-package decoration
<?php
// part of "Users" package
/*
* The drawback here is that the User class must be moved into the userland space so the developers can attach
* decorating packages to it. Maybe this could be set up automatically via a (laravel-specific) config var?
*/
class User {
@rizqidjamaluddin
rizqidjamaluddin / gist:61cd7f61ca36cf5c2d5a
Last active February 19, 2020 22:01
Run a bunch of phpunit tests in sequence via Laravel 4's artisan CLI
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class RunTests extends Command
{
@rizqidjamaluddin
rizqidjamaluddin / gist:a9a88fda81e96d65b4cb
Created May 8, 2014 07:32
Baseline vagrant bootstrap.sh file. PHP5, MySQL, composer, redis, server at 192.168.33.10.xip.io, based on a terrifying combination of other people's scripts
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'