Skip to content

Instantly share code, notes, and snippets.

View freyandhy's full-sized avatar

Friandy D. Noviandha freyandhy

View GitHub Profile
@freyandhy
freyandhy / Skrill.php
Created January 6, 2016 15:19
Skrill Payment Gateway for BoxBilling
<?php
class Payment_Adapter_Skrill implements \Box\InjectionAwareInterface
{
/**
* @var \Box_Di
*/
protected $di;
@freyandhy
freyandhy / Skrill.php
Created January 6, 2016 15:19
Skrill Payment Gateway for BoxBilling
<?php
class Payment_Adapter_Skrill implements \Box\InjectionAwareInterface
{
/**
* @var \Box_Di
*/
protected $di;
<?php
require 'vendor/autoload.php';
$loader = new Twig_Loader_Filesystem('views');
$twig = new Twig_Environment($loader);
echo $twig->render('latihan.html', array(
'name' => 'Frey',
'city' => 'Samarinda'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Twig</title>
</head>
<body>
<p>Hai, saya adalah {{ name }}</p>
<p>Saya berasal dari kota {{ city }}</p>
</body>
<?php
require 'vendor/autoload.php';
$loader = new Twig_Loader_Filesystem('views');
$twig = new Twig_Environment($loader);
$data = array(
'users' => array(
array('name' => 'dana', 'age' => 26, 'married' => false),
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Twig</title>
</head>
<body>
<ul>
{% for user in users %}
{% if user.married == true %}
<?php
session_start();
require __DIR__ . '/../vendor/autoload.php';
// Slim Configuration
$config = array(
'displayErrorDetails' => true,
'addContentLengthHeader' => false,
<?php
require __DIR__ . '/../app/app.php';
$app->run();
<?php
require __DIR__ . '/../app/app.php';
$app->run();
@freyandhy
freyandhy / app.php
Last active February 19, 2017 14:37
<?php
session_start();
require __DIR__ . '/../vendor/autoload.php';
// Slim Configuration
$config = array(
'displayErrorDetails' => true,
'addContentLengthHeader' => false,