Skip to content

Instantly share code, notes, and snippets.

View fhferreira's full-sized avatar
🏠
Home-Office since 2005

Flávio H. Ferreira fhferreira

🏠
Home-Office since 2005
View GitHub Profile
@standa
standa / Mandrill.php
Created March 16, 2014 21:05
Mandrill CodeIgniter Library
<?php if (!defined('BASEPATH')) die();
/**
* This is a complete rewrite to use the Mandrill API instead of the
* weird thing that OpenCart people patched up in here.
*
* Inspired by Mindrill
* @link https://github.com/darrenscerri/Mindrill
*
* @author standa

Sobre o Laravel Forge

O Forge é um projeto pessoal do Taylor, resultado de 9 meses de trabalho. O plano inicial era lançá-lo em Dezembro de 2013, próximo do lançamento da versão 4.1 do Laravel.

Desenvolver o Forge levou mais tempo do que a versão inicial do Laravel, que levou 3 meses — se não me engano. O Taylor achava que apenas ele usaria o Laravel.

Ele gastou cerca de 18h por semana, às vezes menos. 2h por noite + 4h extras no final de semana. Sua esposa dorme por volta das 22h e ele trabalha até meia-noite. Geralmente ele dorme até 7:45h. Ele disse que precisa de pelo menos 7h de sono para render bem.

O change log da versão 4.1 do Laravel é [4x ma

@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active April 23, 2024 19:48
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@fmasanori
fmasanori / votos.py
Created October 9, 2014 13:23
Resultados das eleições 2014 Python 3 (adaptado Vinicius Marangoni)
#versão Python 3 de http://pastebin.com/uRnDZaTz (Vinicius Marangoni)
import urllib.request
import json
url = 'http://divulga.tse.jus.br/2014/divulgacao/oficial/143/dadosdivweb/br/br-0001-e001431-w.js'
def main():
resp = urllib.request.urlopen(url).read()
resp = json.loads(resp.decode('utf-8'))
candidatos = resp['cand']
@fhferreira
fhferreira / 1.markdown
Last active August 29, 2015 14:08 — forked from pinedamg/1.markdown

My Magento Snippets

Checkout virtual - downloadable product

<?php

require_once '../app/Mage.php';
 
Varien_Profiler::enable();
@fhferreira
fhferreira / composer.json
Last active August 29, 2015 14:15
Silex API easy
{
"require": {
"silex/silex": "~1.2",
"doctrine/dbal": "2.2.*"
}
}
@vluzrmos
vluzrmos / compat_l5.php
Last active November 1, 2022 20:43
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
<?php
if(!function_exists('config_path'))
{
/**
* Return the path to config files
* @param null $path
* @return string
*/
function config_path($path=null)
@gusribeiro
gusribeiro / iin_card
Last active April 26, 2024 21:10
Regex para identificar bandeiras do cartão de crédito
Amex: ^3[47][0-9]{13}$
Aura: /^((?!504175))^((?!5067))(^50[0-9])/
Banese Card: '^636117'
Cabal: '(60420[1-9]|6042[1-9][0-9]|6043[0-9]{2}|604400)'
Diners: '(36[0-8][0-9]{3}|369[0-8][0-9]{2}|3699[0-8][0-9]|36999[0-9])
Discover: /^6(?:011|5[0-9]{2})[0-9]{12}/
Elo: /^4011(78|79)|^43(1274|8935)|^45(1416|7393|763(1|2))|^50(4175|6699|67[0-6][0-9]|677[0-8]|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9])|^627780|^63(6297|6368|6369)|^65(0(0(3([1-3]|[5-9])|4([0-9])|5[0-1])|4(0[5-9]|[1-3][0-9]|8[5-9]|9[0-9])|5([0-2][0-9]|3[0-8]|4[1-9]|[5-8][0-9]|9[0-8])|7(0[0-9]|1[0-8]|2[0-7])|9(0[1-9]|[1-6][0-9]|7[0-8]))|16(5[2-9]|[6-7][0-9])|50(0[0-9]|1[0-9]|2[1-9]|[3-4][0-9]|5[0-8]))/
Fort Brasil: '^628167'
GrandCard: '^605032'
Hipercard: ^606282|^3841(?:[0|4|6]{1})0