Skip to content

Instantly share code, notes, and snippets.

View reid's full-sized avatar

Reid Burke reid

View GitHub Profile
@reid
reid / twipple.php
Created September 26, 2008 01:24
Parse a Yahoo! Pipe of Twitter feeds to make wordle.net friendly output
<?php
/* twipple.php
* Yahoo! Pipes + Twitter + Wordle
*
* Usage: php twipple.php | pbcopy
* ...then paste into wordle.net
*/
$pipe_url = 'http://pipes.yahoo.com/pipes/pipe.run?_id=0Dd3hqOG3RGDdbrnbLsjiw&_render=php';
@reid
reid / dialogue.php
Created October 8, 2008 20:44
Transform a Colloquy.app conversation into a simpler format
<?php
$notice = $_SERVER['argv'][1] == '-notice';
$input = '';
if (STDIN) while (!feof(STDIN)) $input .= fgets(STDIN, 4096);
foreach (explode("\n", $input) as $text) {
$a = explode('<', $text);
if (count($a) > 1) {
@reid
reid / gifts.html
Created November 10, 2008 20:35
A YAP 1.0 Ready OpenSocial Application
<!--
A sample YAP 1.0 ready OpenSocial application.
Adapted from http://code.google.com/apis/opensocial/articles/tutorial/tutorial-0.7.html
Updated for OpenSocial 0.8 and the Yahoo! Application Platform by Reid Burke 5 Sep 2008
YAP or 0.8 specific comments are annotated with YAPNOTE
Updated 10 Nov 2008
-->
<script type="text/javascript">
@reid
reid / yahoo_social_sample.php
Created March 3, 2009 20:10
The code below can be used to create an Open or OAuth Application
<?php
// The code below can be used to create an Open or OAuth Application.
// In OAuth Applications, the Consumer Key is known as the API Key.
// The Consumer Secret is also referred to as the Shared Secret.
// Include the YOS library.
require("Yahoo.inc");
// Your Consumer Key (API Key) goes here.
@reid
reid / untumblr.js
Created February 1, 2010 07:30
Deletes all feed posts from a tumblelog
// Deletes all feed posts from a tumblelog
process.mixin(GLOBAL, require("sys"));
var http = require("http"),
query = require("querystring");
var hostname, email, password;
function fail (message) {
<!DOCTYPE html>
<html>
<head>
<title>Awesome Hack</title>
</head>
<body>
</body>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>UpdateScript</key>
<string>http://atv-xbmc-launcher.googlecode.com/svn/tags/ul-info/additional-scripts/FirefoxInstaller.sh</string>
<key>URL</key>
<string>ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/mac/en-US/Firefox 3.6.3.dmg</string>
<key>Type</key>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Paul Tarjan</author>
<description>Facebook Graph API</description>
<documentationURL>http://graph.facebook.com</documentationURL>
<documentationURL>http://developers.facebook.com/docs/reference/api/page</documentationURL>
<sampleQuery>SELECT * FROM facebook.graph WHERE id='paul.tarjan'</sampleQuery>
<sampleQuery>SELECT * FROM facebook.graph WHERE id='facebook' AND connection='posts'</sampleQuery>
<sampleQuery>SELECT * FROM facebook.graph WHERE ids='4,6'</sampleQuery>
<sampleQuery>SELECT * FROM facebook.graph WHERE search='conference' AND type='event'</sampleQuery>
<?xml version="1.0" encoding="UTF-8" ?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Reid Burke</author>
<sampleQuery>select * from {table}</sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="XML">
<urls>
<url></url>