Skip to content

Instantly share code, notes, and snippets.

View augustohp's full-sized avatar

Augusto Pascutti augustohp

View GitHub Profile
@augustohp
augustohp / exception_handlers_on_respect_rest.md
Created September 17, 2012 03:01 — forked from alganet/exception_handlers_on_respect_rest.md
Excessões e Erros no Respect\Rest

Lidando com Exceptions no Respect\Rest

Bem vindo! Esse é o primeiro-git-post de uma nova funcionalidade em um componente do Respect:

Suponha que você seja louco o suficiente para arquitetar uma API de Olá Mundo que randomicamente dispare Exceptions. Com o Respect/Rest isso ficaria assim:

<?php
$router = new Respect\Rest\Router;

Factories e Interfaces no Respect\Config

Oi de novo! Dia produtivo. Temos novas funcionalidades no Respect\Config também:

Factories e Builders

O Respect\Config gerencia as configurações de seus objetos, incluindo quem depende de quem.

@augustohp
augustohp / to-apple.md
Last active June 5, 2023 18:49
To: Apple

Apple,

You are a company I learned to love and hate. In that same order.

  • I love the way you try to reach excellence in everything you do
  • I hate the way you try to fuck everyone else who tries to do same

Things I (still) love

  • The MacBook (track pad) is a great piece of hardware, sadly it is not one-of-a-kind anymore. Even more sad is that all other (great) options do not try to hold you on all kind of accessories and stuff, although it still bearable for an old time customer.
@augustohp
augustohp / 1000n100c.jpg
Last active December 18, 2015 23:59
Plotando gráficos do Apache benchmark
1000n100c.jpg
var http = require('http');
var xmld = require('xml2js');
var express = require('express');
var app = express();
// app.use(express.static(__dirname + '/public'));
app.get("/", function (req, res) {
var options = {
@augustohp
augustohp / README.md
Last active December 31, 2015 00:49
My Manifesto

My Manifesto

  1. You did something stupid, fuck you!
@augustohp
augustohp / vim-para-usuarios-git.md
Last active March 20, 2024 20:09
Post: VIM para usuários Git

VIM para usuários Git

A intenção desse post é melhorar, se possível, seu workflow com o [Git][] se ele atualmente ele consiste de:

  1. Usar o [Git][] através de uma shell de sua escolha.
  2. Usar o [VIM][] como [editor padrão][2] [no Git][1].

Se você usa alguma ferramenta gráfica (tig também conta), eu não quero saber. Se você usa o [Git][] numa shell em conjunto com outro editor, procuro ansiosamente seu comentário me convencendo a trocar. :)

Preparando o VIm

Keybase proof

I hereby claim:

  • I am augustohp on github.
  • I am augustohp (https://keybase.io/augustohp) on keybase.
  • I have a public key whose fingerprint is BC17 089B E946 FA41 10BE 422F 0C63 DBDD 93E2 C95D

To claim this, I am signing this object:

@augustohp
augustohp / jekyll
Last active August 29, 2015 14:00
Jekyll init script for debian (serves Ubuntu).
#!/bin/bash
#
# Jekyll is a Ruby based website/blog generator, this is his
# (unnoficial) init script. Tested with Jekyll 1.5.
# Author: Augusto Pascutti <[email protected]>
set -o errexit
set -o pipefail
[[ $DEBUG ]] && set -x
@augustohp
augustohp / custom-respect-validation-rules.md
Last active March 24, 2022 17:24
How to create custom Respect\Validation rules.

Custom rules on Respect/Validation

You may not know that [the most awesome validation engine for PHP][1] out there is [Respect/Validation][2]. If you do, this is tailored for you!

All rules on [Respect/Validation][2] are meant to be used together, composing a more complex validation rule that is closer to the domain of your application than the existing ones, let's try an example: