Skip to content

Instantly share code, notes, and snippets.

View phcostabh's full-sized avatar
🧑‍💻
Coding

Philippe Santana Costa phcostabh

🧑‍💻
Coding
View GitHub Profile
@phcostabh
phcostabh / Repository.php
Last active December 17, 2015 05:59
MySQL Repository class.
<?php
class Repository
{
/**
* Define o nome da tabela.
*
* @var string
*/
# Update packages
sudo apt-get update && sudo apt-get upgrade --yes
# Install git
sudo apt-get git-core install build-essential autoconf libtool libxml2 libxml2-dev openssl libcurl4-openssl-dev \
libbz2-1.0 libbz2-dev libjpeg-dev libpng12-dev libfreetype6 libfreetype6-dev \
libldap-2.4-2 libldap2-dev libmcrypt4 libmcrypt-dev libmysqlclient-dev \
libxslt1.1 libxslt1-dev libxt-dev
<?php
interface Pizza
{
public function getDescription();
public function getPrice();
}
class PlainPizza implements Pizza
{
@phcostabh
phcostabh / php-fpm
Last active December 17, 2015 19:09 — forked from kain-jy/gist:4138784
PHP-FPM as service with PHPBrew
#! /bin/sh
#
# run as current user
#
# before, you should edit php-fpm.conf
# and comment out [www] user and group.
PHP_BASE=$HOME/.phpbrew/php/$PHPBREW_PHP
PHP_FPM_BIN=$PHP_BASE/sbin/php-fpm

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

" ---------------------------------------------------------------------------------------------------"
" UI Configuration
" ---------------------------------------------------------------------------------------------------"
colorscheme jellybeans
set guifont=Liberation\ Mono\ 09
set linespace=6
set nospell
set t_Co=256
set bg=dark
nnoremap ; :
{% extends 'base.volt' %}
{% block content %}
{%- macro error_messages(message, field, type) %}
<div>
<span class="error-type">{{ type }}</span>
<span class="error-field">{{ field }}</span>
<span class="error-message">{{ message }}</span>
</div>
@phcostabh
phcostabh / CookieFlashMessage.php
Created August 9, 2013 11:33
Implementation of flash messages using cookies instead of session.
<?php
namespace Adm\Library;
/**
*
*/
class CookieFlashMessage implements \Phalcon\FlashInterface
{
/**
<?php
/**
*
*/
class FormHelper
{
/**
* Controla os indices de metadados
* @var int
mkdir -p {{0..9},{a..f}}/{{0..9},{a..f}}/{{0..9},{a..f}}/{{0..9},{a..f}}