Skip to content

Instantly share code, notes, and snippets.

View augustohp's full-sized avatar

Augusto Pascutti augustohp

View GitHub Profile
@augustohp
augustohp / github-pandoc.css
Last active December 15, 2017 06:41 — forked from dashed/github-pandoc.css
A GitHub-like CSS for Markdown files rendered in HTML with pandoc.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Debian-compatible Xvfb startup script.
# Tom Meier <tom@venombytes.com>
# Jeffery Fernandez <jeffery@fernandez.net.au>
#
### BEGIN INIT INFO
# Provides: xvfb_daemon
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
@augustohp
augustohp / mailcatcher.sh
Last active April 24, 2019 07:18 — forked from dakatsuka/mailcatcher.sh
Mailcatcher init script for Debian.
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: mailcatcher
# Required-Start: $local_fs $network $syslog $portmap
# Required-Stop: $local_fs $network $syslog $portmap
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Start/stop mailcatcher daemon.
### END INIT INFO
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 = {

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 / 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;
@augustohp
augustohp / gist:3734944
Created September 17, 2012 00:14 — forked from netojoaobatista/gist:3716209
histórico do chat do Hangout sobre PHP
esse alganet é uma figura ^^ kkkk
Ruan_Aragao: Jamaicaaa kkkk
DavidRamires: Manual fantastico!
danjesus: netojoaobatista, sem d?vida ? o melhor manual
augustohp: +1
Ruan_Aragao: Demais!
danjesus: e os coment?rios s?o foda
poultwo: total
Denise: Manual PHP, Like, +1
Ruan_Aragao: Ele é muito mais vivo que eu :-S
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@augustohp
augustohp / burp.md
Created June 21, 2012 02:16
How to code drunk

How to code drunk

Some people born with it, some people are self-taught on this, some people just discover how. How about a guide on how to code great software while still drunk as a cow?

Rules

  • You can add your patterns by forking this gist.
  • You must be drunk before sending a pattern.
@augustohp
augustohp / php_singleton_test.php
Created March 31, 2012 05:37
A new way to make singleton in PHP?
<?php
/**
* @author: Garith
*/
class Singleton{
protected static $instance = null;
public static function load(){
if(self::$instance === null){