Skip to content

Instantly share code, notes, and snippets.

View dmpatierno's full-sized avatar

David Patierno dmpatierno

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dmpatierno on github.
  • I am dmpatierno (https://keybase.io/dmpatierno) on keybase.
  • I have the public key with fingerprint 47C3 7FCF 53D7 0BD5 4994  190D 023F A666 3F73 BB87

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<title><?=Page::getTitle()?></title>
<meta charset="utf-8">
<link href="/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<? include $template; ?>
@dmpatierno
dmpatierno / doodleapi.php
Created July 8, 2011 01:26
Creates a new poll with the Doodle API
<?php
$api = new DoodleAPI();
$api->createPoll(array(
'title' => 'Test Poll',
'description' => 'Test Description',
'fromName' => 'David Patierno',
'fromEmail' => 'dmpatierno@gmail.com',
'dates' => array(
var tumblrAutoPager = {
url: "http://proto.jp/",
ver: "0.1.7",
rF: true,
gP: {},
pp: null,
ppId: "",
LN: location.hostname,
init: function () {
if ($("autopagerize_icon") || navigator.userAgent.indexOf('iPhone') != -1) return;
@dmpatierno
dmpatierno / unfollow.php
Created May 15, 2011 03:54
unfollow all users on tumblr
<?php
$cookie = "<insert cookies>";
$token = null;
do {
$users = get_users();
foreach ($users as $user)
unfollow($user);
} while (count($users));
<?php
function get_user($userid) {
global $db, $m, $photo_urlbase;
$key = "photochallenge_user_{$userid}";
if (!($user = $m->get($key))) {
$query = <<<EOT
SELECT `userid`, `name`, `avatar`, `location`, `facebook`, `twitter`, `flickr`, `pro`
FROM `users`
<?php
require 'lib.php';
$_REQUEST['zip'] = $_REQUEST['Digits'];
$info = get_info();
extract($info);
$city = preg_replace("/, .*$/", "", $city);
PhotoChallenge[4953:607] {
"ad_text" = "Sponsored by ProCamera";
"ad_type" = 1;
"img_url" = "http://s3.amazonaws.com/adrollo-custom-images/2bf0880758a7f8f1ef7675ec371c9ad2.jpg";
"img_url_480x75" = "";
"img_url_640x100" = "http://s3.amazonaws.com/adrollo-custom-images/6114ea24512c8a654ba48a076be20902.jpg";
"launch_type" = 2;
"link_type" = 1;
"metrics_url" = "xxx";
"metrics_url2" = "";
{
"themes": [
{
"themeid": 3,
"start": 1298620800,
"end": 1299225600,
"title": "Cupcakes",
"total": 3
},
{
<?php
/**
* Compares all running instances to all reserved instances and reports
* utilization. Useful for making sure you're not wasting money. :P
*
* Requires EC2_CERT and EC2_PRIVATE_KEY environment variables to be set.
*
* @author Dave
* @date 2010-10-05
*/