Skip to content

Instantly share code, notes, and snippets.

<?php
add_action('init', 'type_post_turmas');
function type_post_turmas() {
$labels = array(
'name' => _x('Turmas', 'post type general name'),
'singular_name' => _x('Turma', 'post type singular name')
);
$args = array(
@raphaeldealmeida
raphaeldealmeida / formbuilderannotations.php
Last active December 31, 2015 20:59
Exemplos de annotation form builder
<?php
use Zend\Form\Annotation;
/**
* @Annotation\Name("Nome do form")
*
*
* Exemplo de text
* @Annotation\Type("Zend\Form\Element\Text")
@raphaeldealmeida
raphaeldealmeida / Module.php
Last active December 31, 2015 16:08
Module para autenticação Doctrine
<?php
namespace Application;
use Zend\Authentication\AuthenticationService;
class Module
{
public function getServiceConfig()
{
@raphaeldealmeida
raphaeldealmeida / module.config.php
Created December 17, 2013 19:35
Autenticação doctrine
return array(
'doctrine' => array(
'authentication' => array(
'orm_default' => array(
'object_manager' => 'Doctrine\ORM\EntityManager',
'identity_class' => 'Application\Entity\User',
'identity_property' => 'email',
'credential_property' => 'password',
),
),
@raphaeldealmeida
raphaeldealmeida / Module.php
Created December 16, 2013 01:41
Alterar template apenas dentro do módulo
<?php
namespace MeuModulo;
use Zend\ModuleManager\ModuleManager;
class Module{
public function init(ModuleManager $moduleManager){
$sharedEvents = $moduleManager->getEventManager()
@raphaeldealmeida
raphaeldealmeida / gist:7966583
Created December 14, 2013 23:44
Extrai as entidades das tabelas doctrine
orm:convert-mapping
annotation module/Delivery/src/ --namespace="Delivery\Entity\\" --from-database
@raphaeldealmeida
raphaeldealmeida / gist:6855246
Last active December 24, 2015 20:08
Compilação do PHP
# pacotes .deb
#
# apache 2
# apache2 apache2-dev apache2-utils
#
# MySQL
# libmysqlclient-dev mysql-server-5.5
#
# ReadLine
# libreadline6-dev
# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = https://user:[email protected]:3128/
http_proxy = http://user:[email protected]:3128/
ftp_proxy = http://user:[email protected]:3128/
# If you do not want to use proxy at all, set this to off.
use_proxy = on
Acquire::http::Proxy "http://ubuntu-galeao.ccarj.intraer:3142";
class oracle::server {
file {
"/etc/wgetrc":
source => "puppet:///modules/oracle/wgetrc";
}
file {
"/etc/apt/apt.conf.d/01proxy":
source => "puppet:///modules/oracle/01proxy";