Skip to content

Instantly share code, notes, and snippets.

View rilwanfit's full-sized avatar

MH Rilwan rilwanfit

View GitHub Profile
@rilwanfit
rilwanfit / README.md
Created April 20, 2017 10:53 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


class XFrameOptionHeader extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
{
$this->_response->setHeader('X-FRAME-OPTIONS', 'DENY');
}
}
@rilwanfit
rilwanfit / Newspaper.php
Last active March 29, 2018 13:51
[Design Pattern] (Observer) - Newspaper and Reader
class Newspaper implements SplSubject
{
private $name;
private $observers = [];
private $content;
public function __construct($name)
{
$this->name = $name;
}
@rilwanfit
rilwanfit / Dockerfile
Last active October 9, 2018 06:08
ubuntu-nginx-php-image
FROM ubuntu:18.04
LABEL maintainer="mhrilwan"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y gnupg tzdata \
&& echo "UTC" > /etc/timezone \
&& dpkg-reconfigure -f noninteractive tzdata
<?php
namespace App\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
use Faker\Factory;
use Faker\Generator;
abstract class BaseFixture extends Fixture
version: "3"
services:
mysql:
image: mysql:5.7
volumes:
- mysql-data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
@rilwanfit
rilwanfit / Legacy 01
Last active November 16, 2019 04:50
Use this class to practise TDD and refactoring the code
<?php
class User
{
private $userId;
private $firstName;
private $lastName;
private $email;
private $password;
private $salt;
@rilwanfit
rilwanfit / phpunit.xml
Last active November 17, 2019 10:12
PHPUnit configuration
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="config/bootstrap.php"
>
<php>
{% apply inky_to_html|inline_css(source('@styles/foundation-emails.css'), source('@styles/email.css')) %}
<container>
<row class="header">
<columns>
<a href="{{ url('app_homepage') }}">
<img src="{{ email.image('@images/email/logo.png') }}" class="logo" alt="SpaceBar Logo">
</a>
</columns>
</row>
{% block content %}