Skip to content

Instantly share code, notes, and snippets.

View faizalpribadi's full-sized avatar
⏱️
Time Travel

Faizal Pribadi faizalpribadi

⏱️
Time Travel
View GitHub Profile
@faizalpribadi
faizalpribadi / iptables-config
Created May 23, 2014 21:43
Iptables Configuration For CentOS | Debian | Redhat
*mangle
:PREROUTING ACCEPT [25:1778]
:INPUT ACCEPT [25:1778]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [37:1889]
:POSTROUTING ACCEPT [35:1400]
-A PREROUTING -p tcp -m tcp --sport 21 -j TOS --set-tos 0x08/0xff
-A PREROUTING -p udp -m udp --sport 21 -j TOS --set-tos 0x08/0xff
-A PREROUTING -p tcp -m tcp --sport 20 -j TOS --set-tos 0x08/0xff
-A PREROUTING -p udp -m udp --sport 20 -j TOS --set-tos 0x08/0xff
@faizalpribadi
faizalpribadi / .vimrc
Last active August 29, 2015 14:04
vala configuration for vim , detail : https://wiki.gnome.org/Projects/Vala/Vim
" Disable valadoc syntax highlight
"let vala_ignore_valadoc = 1
" Enable comment strings
let vala_comment_strings = 1
" Highlight space errors
let vala_space_errors = 1
" Disable trailing space errors
"let vala_no_trail_space_error = 1
@faizalpribadi
faizalpribadi / ShellCommand.php
Created November 8, 2012 04:45
Shell Command Updated
<?php
namespace Mozart\Library\Console;
use Mozart\Library\Console\Console;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Shell;
use Symfony\Component\Console\Command\Command;
/**
@faizalpribadi
faizalpribadi / TestAnnotation.php
Created November 25, 2012 16:46
@mozart\Annotations Example
<?php
namespace App;
/**
* import annotations
*/
use Mozart\Library\Annotations as Mozart;
/**
* @Annotation
@faizalpribadi
faizalpribadi / Access.php
Created November 26, 2012 06:48
Mozart Annotation
<?php
namespace Mozart\Library\Annotations;
/*
* This file is a part of Mozart PHP Small MVC Framework
*
* (C) Faizal Pribadi - Gesture Media Ltd - 2012
*
* For the full copyright and license information, please view the LICENSE
*
@faizalpribadi
faizalpribadi / EventTest.php
Created November 28, 2012 03:06
Example Mozart PHP Event
$fileLoader = dirname(dirname(__FILE__));
require $fileLoader . '/autoload.php';
use Mozart\Library\Event\Event;
use Mozart\Library\Event\EventDispatcher;
class OhMyEventListener
{
public function create(Event $event)
{
@faizalpribadi
faizalpribadi / SemanticalEvent.php
Created November 28, 2012 03:23
Simple Callback Function Event
<?php
interface SemanticalEventInterface
{
public function set($eventName);
public function get($functionName);
}
class SemanticalEvent implements SemanticalEventInterface
{
private $eventName;
@faizalpribadi
faizalpribadi / ContainerBuilderUp.php
Created December 2, 2012 05:46
Symfony Console With Dependency Injection As Service !
<?php
namespace Mozart\Library\DependencyInjection;
class ContainerBuilderUp
{
public function running()
{
$format = '(%1$2d = %1$04b) = (%2$2d = %2$04b)'
. ' %3$s (%4$2d = %4$04b)' . "\n";
@faizalpribadi
faizalpribadi / ContainerEvent.php
Last active December 17, 2015 21:38
Mozart Event Component Couple With Mozart Dependency Injection Component !
<?php
/**
* Build couple the component of Mozart PHP
* Create the custom event and dispatch With Dependency Injection
* Simple And Very Interesting
*/
/**
@faizalpribadi
faizalpribadi / Container.php
Created June 19, 2013 17:12
Dependency Injection | Inject Other Object Converting To String Alias @see : http://picocontainer.codehaus.org/ - http://picocontainer.com/
<?php
namespace YourApp;
/*
* This file is a part of Mozart PHP Small MVC Framework
*
* (c) Faizal Pribadi <faizal_pribadi@aol.com>
*
* For the full copyright and license information, please view the LICENSE
*