Skip to content

Instantly share code, notes, and snippets.

Avatar
📹
Recording youtube videos

Claudson Oliveira filhodanuvem

📹
Recording youtube videos
View GitHub Profile
View duvidas-microblogging.md

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

View respect_config_issue.ini
; Possible bug on Respect/Config. Test and open an issue.
; MONOLOG
[redisMonologHandler Monolog\Handler\StreamHandler]
[monolog Monolog\Logger]
name = phartitura
handlers = [[redisMonologHandler],]
; handlers = [[redisMonologHandler]] <----- without comma, it's not parsed and the library throws an error
; Object of class Respect\Config\Instantiator could not be converted to string in .. /vendor/respect/config/library/Respect/Config/Container.php on line 317
@filhodanuvem
filhodanuvem / parser_quest.py
Last active Dec 15, 2015
How a simple parser to python can generate a AST ?
View parser_quest.py
def foo():
name = "cloud"
age = 22
if age > 22 :
print name
age += 1
@filhodanuvem
filhodanuvem / 1-basic_usage.md
Last active Dec 11, 2015
DataTablesBundle - documentation
View 1-basic_usage.md

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 / cool_url.php
Created Dec 26, 2012
And if cURL was more easy on PHP ?
View cool_url.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 / pegadinha.php
Created Dec 11, 2012
Essa questão tem mil interpretações erradas rs
View pegadinha.php
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 / php-get.sh
Created Dec 9, 2012
Brincando com shellscript, baixando automaticamente versões do php.
View php-get.sh
#!/bin/bash
help()
{
echo "help! I need somebody, help!"
exit 1
}
# php-get install 5.5.0 /destiny
if [ $# -lt 2 ];
@filhodanuvem
filhodanuvem / php_many_versions.sh
Created Dec 6, 2012
Multiple PHP versions set-up by Derick Rethans
View php_many_versions.sh
#!/bin/sh
VERSION=$1
DEBUG=$2
ZTS=$3
THIRTYTWO=$4
POSTFIX=
EXTRA_FLAGS=
if (test "${DEBUG}" = "nodebug"); then
@filhodanuvem
filhodanuvem / gist:4215135
Created Dec 5, 2012
How to test php 5.5
View gist:4215135
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
You can’t perform that action at this time.