Skip to content

Instantly share code, notes, and snippets.

View caferrari's full-sized avatar

Carlos A. Ferrari caferrari

View GitHub Profile
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@caferrari
caferrari / lynx.py
Created March 18, 2010 14:53
Ubuntu Lucid Lynx Beta 1 release checker
#!/usr/bin/python2.6
# -*- coding: utf-8 -*-#
import urllib2, hashlib, sys, pynotify
from time import sleep
url = 'http://cdimage.ubuntu.com/releases/lucid/'
md5_base = 'f67f811ea2bf1e0c14a233d319685f50'
pynotify.init("Ubuntu Lucid")
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
<?php
namespace Teste;
use \ErrorException;
class Test
{
public function metodox(){
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@caferrari
caferrari / Loader.php
Created January 4, 2012 17:55
VorticePHP2 Loader
<?php
/**
* Simple loader class
*
* Usage:
* $loader = new Vortice\Common\Loader();
* $loader->register('Zend', './Zend/');
* $loader->register('Application', '../app/', 'Application\\');
* $loader->register('Vortice', './');
@caferrari
caferrari / AbstractForm.php
Created December 3, 2012 12:14
trait getInputFilter
<?php
namespace Core\Form;
use Zend\Form\Form;
abstract class AbstractForm extends Form
{
use \Core\Traits\getInputFilter;
}
@caferrari
caferrari / especie.php
Created December 3, 2012 16:32
Especie
<?php
namespace Clinica\Controller;
use Core\Controller\AbstractController;
class Especie extends AbstractController
{
}
wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz
tar -zxvf PDFlib-Lite-7.0.5p3.tar.gz
cd PDFlib-Lite-7.0.5p3/
./configure
make
sudo make install
sudo pecl install pdflib
echo "extension=pdf.so" | sudo tee /etc/php5/conf.d/pdf.ini
@caferrari
caferrari / nginx
Created January 25, 2013 17:32
/etc/init.d/nginx
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon