Skip to content

Instantly share code, notes, and snippets.

View filhodanuvem's full-sized avatar
👋

Claudson Oliveira filhodanuvem

👋
View GitHub Profile
<?php
/**
* Comentario do arquivos
*
* @author Vinícius Fontoura <vinicius@aprimorar.com>
* @copyright 2012 Aprimorar Desenvolvimento Ltda(c)
* @version SVN: $Rev$ $LastChangedDate$ $LastChangedBy$
*/
@filhodanuvem
filhodanuvem / gist:4215135
Created December 5, 2012 12:26
How to test php 5.5
cd ~
wget http://downloads.php.net/dsp/php-5.5.0alpha1.tar.gz
tar -vzxf php-5.5.0alpha1.tar.gz
cd php-5.5.0alpha1/
./configure
make
make test
@filhodanuvem
filhodanuvem / php_many_versions.sh
Created December 6, 2012 12:49
Multiple PHP versions set-up by Derick Rethans
#!/bin/sh
VERSION=$1
DEBUG=$2
ZTS=$3
THIRTYTWO=$4
POSTFIX=
EXTRA_FLAGS=
if (test "${DEBUG}" = "nodebug"); then
@filhodanuvem
filhodanuvem / php-get.sh
Created December 9, 2012 14:16
Brincando com shellscript, baixando automaticamente versões do php.
#!/bin/bash
help()
{
echo "help! I need somebody, help!"
exit 1
}
# php-get install 5.5.0 /destiny
if [ $# -lt 2 ];
@filhodanuvem
filhodanuvem / pegadinha.php
Created December 11, 2012 16:07
Essa questão tem mil interpretações erradas rs
What happens when I execute the following code?
namespace Foo;
function strlen() {}
const INI_ALL = 3;
$a = strlen('hi');
$b = INI_ALL;
try
@filhodanuvem
filhodanuvem / cool_url.php
Created December 26, 2012 16:23
And if cURL was more easy on PHP ?
<?php
//maybe, do a source that works like a client with cURL could be hard and boring.
// A fluent interface would awesome.
// Anyway, the library can be used only to fun and study to learn how HTTP works in lower lever.
use Saturno\CoolUrl\Client as cu;
cu::create()->target("http://example.com/join")
->setMethod('POST')
@filhodanuvem
filhodanuvem / 1-basic_usage.md
Last active December 11, 2015 07:49
DataTablesBundle - documentation

1 - Basic usage

Creating the DataTable Class

At first, we need create the entity that represents your datatables. This table will contain instances of a same type.

<?php    
@filhodanuvem
filhodanuvem / parser_quest.py
Last active December 15, 2015 02:49
How a simple parser to python can generate a AST ?
def foo():
name = "cloud"
age = 22
if age > 22 :
print name
age += 1
@filhodanuvem
filhodanuvem / readme.md
Created June 25, 2013 13:59
Meu PHPStorm

Meu PHPStorm

Dúvidas

1 - Tipo fiz uma sequência aqui de mudanças no código, a lógica ficaria mais ou menos assim?

  • app/TweetPostRequest

    Faço as validações no campos que chegam da request. username e body. No username eu faço a validação se é requerido, se tem espaço e se começa com '@'. No body eu faço a validação se é requerido somente;

  • app/Http/Controllers/TweetController