Skip to content

Instantly share code, notes, and snippets.

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, figure, footer, header, hgroup, menu, nav, section, menu,
@mateuspontes
mateuspontes / current_weather.php
Created May 2, 2011 17:26
Get current weather using Google API
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=Teresina');
$information = $xml->xpath("/xml_api_reply/weather/current_conditions/condition");
echo $information[0]->attributes();
@mateuspontes
mateuspontes / gist:809397
Created February 3, 2011 12:04 — forked from anonymous/gist:807708
Db PDO #php
<?php
final class Db extends PDO {
public static $_instance = NULL;
public static function getInstance() {
if (NULL === self::$_instance) {
self::$_instance = new self();
}