View gist:4475
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OlaMundo{ | |
var $nomeDoUsuario; | |
/** | |
* Escreve Ola Mundo | |
* | |
* @author Chuck Norris. | |
*/ |
View gist:4486
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OlaMundo{ | |
static $nomeDoUsuario; | |
/** | |
* Escreve Ola Mundo | |
* | |
* @author Chuck Norris. | |
*/ |
View gist:4495
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OlaMundo{ | |
static $nomeDoUsuario; | |
/** | |
* Cria instancias automaticamente | |
* | |
* @author Chuck Norris. | |
*/ |
View gist:5278
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Criando o handle de uma conexão com o PostgreSQL | |
$db = new PDO("pgsql:dbname=MEU_DB;host=localhost", "USUARIO", "SENHA" ); | |
// Criando o handle de uma conexão com o MySQL | |
$db = new PDO("mysql:dbname=MEU_DB;host=localhost", "USUARIO", "SENHA" ); |
View gist:20486
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def menino |
View gist:1150657
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta property="og:title" content="Geopromo"/> | |
<meta property="og:type" content="website"/> | |
<meta property="og:url" content="http://www.geopromo.com.br"/> | |
<meta property="og:image" content="http://www.geopromo.com.br/images/icons/opengraph.jpg?1312037161"/> | |
<meta property="og:site_name" content="Geopromo"/> | |
<meta property="og:description" | |
content="Encontre e organize as melhores ofertas da internet baseado na sua localizacao"/> |
View gist:1165072
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) ) { | |
$_SERVER['HTTPS'] = 'on'; | |
$_SERVER['SERVER_PORT'] = 443; | |
} |
View gist:1789961
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vc monta assim | |
dict_medias = {} | |
for pergunta in perguntas: | |
# Atualiza media | |
if pergunta.id in dict_medias: | |
dict_medias[pergunta.id]['media'] = dict_medias[pergunta.id]['media'] + 3 | |
# Cria pergunta | |
else: |
View gist:7257045
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on_page HomePage do |page| | |
sleep(30) | |
page.input_search = "Meu termo de busca" | |
end |
View gist:7257028
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Search For PageObject Article | |
As a Blog do Pedro visitor | |
I want to find for PageObjects article | |
Scenario: | |
Given I am on Blog do Pedro's Home Page | |
When I input a term into search text field | |
Then I should submit search form |
OlderNewer