Skip to content

Instantly share code, notes, and snippets.

View andreia's full-sized avatar
❤️
coding

Andréia Bohner andreia

❤️
coding
View GitHub Profile
<?php
namespace Acme\DemoBundle\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
/**
* Changes Form->submit() behavior so that it treats not set values as if they

Keybase proof

I hereby claim:

  • I am andreia on github.
  • I am andreia (https://keybase.io/andreia) on keybase.
  • I have a public key whose fingerprint is 8D20 56C4 04DA 2B8E 3A1F 8B39 18D7 0631 1E7C 0522

To claim this, I am signing this object:

<?php
$c = new Criteria();
$c->add(AutorPeer::NOME_AUTOR, strtr($this->filters['autor'], ‘*’, ‘%’), Criteria::LIKE);
$c->setIgnoreCase(true);
...
CREATE SEQUENCE SEQ_MYTABLE INCREMENT BY 1 START WITH 1 NOMAXVALUE NOCYCLE NOCACHE ORDER;
UPDATE MYTABLE SET ID = SEQ_MYTABLE.nextval;
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
<?php
echo Doctrine::VERSION;
select * from NLS_DATABASE_PARAMETERS;
@andreia
andreia / gist:415746
Created May 27, 2010 12:32
Gerar código de verificação da Redecard
<?php
// gerar código de verificação da Redecard
function redecardCodver($varFiliacao, $varTotal, $varEndIP){
$dataAtual = getdate();
$segundosAtuais = $dataAtual['seconds'];
$segundosCodificados = array(11,17,21,31,56,34,42,3,18,13,12,18,22,32,57,35,43,4,19,14,9,20,23,33,58,36,44,5,24,15,62,25,34,59,37,45,6,25,16,27,63,26,35,60,38,46,7,26,17,28,14,36,2,39,47,8,29,22,55,33);
$i = $segundosCodificados[$segundosAtuais];
#mydiv ul {
margin-left: 0;
padding-left: 0;
display: inline;
}
#mydiv ul li {
margin-left: 0;
padding-left: 2px;
list-style: none;
$ git checkout master
$ git remote add username git://github.com/username/repo.git
$ git fetch username
$ git merge username/master
$ git push origin master