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 / 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>
@faizalpribadi
faizalpribadi / Debug.php
Created July 7, 2013 09:50
Simple Example Mozart Twig Extension ( Templating For Web Application )
$systemLoader = new \Twig_Loader_Filesystem(__DIR__ . '/Resources/templates');
$twig = new \Twig_Environment($systemLoader);
$twig->addExtension(new PanadaExtension());
$template = $twig->loadTemplate('index.html');
echo $template->render($_REQUEST);
@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
*