Navigation Menu

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 / graphql-server.js
Last active April 5, 2017 06:12
graphql-server
import {
GraphQLSchema,
GraphQLObjectType,
GraphQLList,
GraphQLString,
GraphQLID,
GraphQLBoolean,
GraphQLNonNull,
GraphQLInt
} from 'graphql';
@faizalpribadi
faizalpribadi / webpack.config.js
Created February 17, 2017 14:10
Webpack2 Configuration With Hot Module Plugin
// This configuration for React - Redux Project
// With hot reloaded by react-hot-loader
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const nodeEnv = process.env.NODE_ENV ? 'production' : 'development';
const isProd = nodeEnv === 'production';
@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 / 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 / Configuration.php
Created December 19, 2013 03:55
Bootstrapping & Create Own Configuration With Yaml ( Simply & Magic )
<?php
class Configuration
{
public function setting(array $settings)
{
var_dump($settings);
}
}
@faizalpribadi
faizalpribadi / Event_Component.md
Last active December 26, 2015 13:29
Easy Read | Simple Example Event Observer By Mozart PHP Component
@faizalpribadi
faizalpribadi / index.html
Created September 11, 2013 14:01
Simple Example About AMD JS
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h1>Hello <span class="name"></span></h1>
<script>
var require = {
paths: {
@faizalpribadi
faizalpribadi / Terminal.php
Last active December 22, 2015 09:38
Simple Output Coloring Terminal ( Linux - Windows - Mac )
<?php
/**
* Terminal Coloring
* For windows - linux - mac
*
* @author Faizal Pribadi
*/
class TerminalColor
{
protected $availableColors;
@faizalpribadi
faizalpribadi / Inject.php
Last active December 20, 2015 15:29
Inject Annotation On Property Target For Use Other Class
<?php
use Mozart\Library\Annotations as Mozart;
class User
{
/**
* @Mozart\Inject("Mapper")
*/
protected $mapper;
@faizalpribadi
faizalpribadi / schema-1.0.xsd
Last active December 20, 2015 00:38
DTD XML Schema Service Mozart PHP Framework !
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://mozart.com/xml/schema"
targetNamespace="http://mozart.com/xml/schema" elementFormDefault="qualified">
<xs:annotation>
<xs:documentation><![CDATA[
Mozart schema service DTD XML
Authors: Faizal Pribadi
]]></xs:documentation>
</xs:annotation>