Skip to content

Instantly share code, notes, and snippets.

View kilip's full-sized avatar
🏠
In Search of Enlightenment

Anthonius Munthi kilip

🏠
In Search of Enlightenment
View GitHub Profile
@kilip
kilip / SingletonPattern.php
Last active November 16, 2015 14:41
Singleton Design Pattern
<?php
class Counter
{
protected $count = 0;
static private $instance = null;
// protected will ensure that this class only created once
<?php
class Computer
{
protected $cpu;
protected $ram;
public function __construct($cpu,$ram)
{
$this->cpu = $cpu;
<?php
namespace Chyrius\PublicBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Chyrius\PublicBundle\Menu\RequestVoter;
use Symfony\Component\DependencyInjection\ContainerInterface;
class MenuBuilder
sudo apt-get install \
libxml2 \
libxml2-dev \
libssl-dev \
pkg-config \
curl \
libcurl4-nss-dev \
enchant \
libenchant-dev \
libjpeg8 \
@kilip
kilip / gist:6558471
Created September 14, 2013 03:00
Redmine - CentOS 5.9
rpm -Uvh http://rbel.co/rbel5
yum install ImageMagick-devel ImageMagick-c++-devel
gem install rmagick
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";
<?php
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Behat\BehatBundle\Command\BehatCommand;
class BehatTest extends KernelAwareTest
{
/**
<?php
// src/Foobar/Controller/FooController.php
namespace Foobar\Controller;
class FooController
{
public function helloAction($request)
{
@kilip
kilip / HelloWorld.cpp
Created October 11, 2012 16:50
C++ Hello World
#include <iostream>
int main()
{
std::cout << "Hello, World!\n";
}
@kilip
kilip / HelloWorld.c
Created October 11, 2012 16:21
B Language
main(){
extrn a, b, c;
putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';