Skip to content

Instantly share code, notes, and snippets.

View ppadron's full-sized avatar

Pedro Padron ppadron

View GitHub Profile
@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 (
<?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));
< 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",
{
"username": "minhaempresa",
"emailAddress": "email@example.com",
"apiKey": "0e4fe7b1c0",
"rateLimit": {
"max": 10000,
"reset": 1313389829,
"current": 11
}
}
<?php
require_once 'Akna.php';
$usuario = "john@example.com";
$senha = "minhasenha";
$akna = new Akna($usuario, $senha);
$contacts = $akna->emailMarketing->contacts;
$detalhes = array(
<?xml version=”1.0″ encoding=”UTF-8″?>
<AKNA>
<FUNC TRANS=”" KEY=”0dc001e4ca76574defca18cfbbfd”>
<RETURN ID=”11″>XML em formato inválido Error: Variável do XML está sem conteúdo ou não foi informada.</RETURN>
</FUNC>
</AKNA>
<main>
<emkt trans=”11.10″>
<nome>Lista de Contatos Importada via FTP</nome>
<arquivo>ftp://meuusuario:minhasenha@ftp.example.com/contatos.csv</arquivo>
<separador>;</separador>
<campos>
<nome col=”0″/>
<email col=”1″/>
<empresa col=”3″/>
</campos>
<main>
<emkt trans="11.05">
<nome>Minha Lista de Contatos</nome>
<substituir>S</substituir>
<destinatario>
<nome>John Doe</nome>
<email>john@example.com</email>
</destinatario>
</emkt>
</main>
<ul id="faq">
<li>
<a href="#intro">1. Introdução</a><br/>
<ol>
<li><a href="#auth">1.1 Autenticação</a></li>
<li><a href="#format">1.2 Formato de Dados</a></li>
<li>
<a href="#response-codes">Códigos de Resposta</a><br/>
<ul>
<li><a href="#response-codes-success">Sucesso</a></li>
<?php
$po = new Po4a(array(
'masterTranslationFile' => "{$this->translationsDir}/%master.pot",
'translationFile' => "{$this->translationsDir}/%master-%lang.po",
'sourceLanguage' => 'pt',
'targetLanguages' => array('en', 'es', 'de'),
'force' => true,
'files' => array(
array(