Skip to content

Instantly share code, notes, and snippets.

View ppadron's full-sized avatar

Pedro Padron ppadron

View GitHub Profile
< HTTP/1.1 200 OK
< Server: nginx/0.8.54
< Date: Fri, 15 Jul 2011 10:20:35 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
<
{
"username": "minhaempresa",
"emailAddress": "email@example.com",
<?php
require_once 'php-webdriver/lib/WebDriver/ClassLoader.php';
$driver = new WebDriver("http://localhost:4444/wd/hub");
$session = $driver->session('chrome');
$session->open('http://google.com/');
// $session->window('current')->postSize(array('width' => 1024, 'height' => 4*1024));
@ppadron
ppadron / gist:7095522
Last active December 26, 2015 04:48
"A serious limitation of the inheritance feature is that indexes (including unique constraints) and foreign key constraints only apply to single tables, not to their inheritance children. This is true on both the referencing and referenced sides of a foreign key constraint." http://www.postgresql.org/docs/9.3/static/ddl-inherit.html#DDL-INHERIT-…
CREATE TABLE people (
id serial primary key,
name text
);
CREATE TABLE scientists (
university text
) INHERITS (people);
CREATE TABLE chefs (
hitmail.com
rxdoc.biz
cox.com
126.net
126.com
comast.com
comast.net
yandex.com
wegas.ru
twc.com
it 'should not consider as a missing attribute a value that evaluates to false' do
subject.params do
requires :first
optional :false
end
subject.post '/declared' do
error!('expected false', 400) if declared(params, include_missing: false)[:false] != false
''
end