Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Comment block
* @author: Ross Masters <ross@php.net>
* @build 1
*/
final class Dog extends Quadroped {
public $name;
private $breed;
@rmasters
rmasters / ajax-feeds.js
Created March 19, 2009 20:33
Using the Google Feeds API
// Load the feeds library, version 1
google.load("feeds", "1");
// Callback function
function initialize() {
// The feed we want to load
var feed = new google.feeds.Feed("http://www.digg.com/rss/index.xml");
// Load the feed
feed.load(function(result) {
if (!result.error) {
@rmasters
rmasters / feedcontrol.js
Created March 19, 2009 20:40
Using the FeedControl on uvshock
google.load("feeds", "1");
function initialize() {
var feedControl = new google.feeds.FeedControl();
feedControl.addFeed("http://twitter.com/statuses/user_timeline/14399435.atom", "Tweets");
feedControl.addFeed("http://stackoverflow.com/feeds/user/2025", "StackOverflow");
feedControl.addFeed("http://www.google.com/reader/public/atom/user%2F04968712295736668054%2Fstate%2Fcom.google%2Fbroadcast", "Shared Items");
feedControl.addFeed("http://feeds.delicious.com/v2/rss/rossmasters?count=15", "Shared Bookmarks");
feedControl.draw(document.getElementById("feedControl"));
}
@rmasters
rmasters / feedcontrol.css
Created March 19, 2009 20:42
Styling FeedControl on uvshock
/**
* Suppress everything except for title
*/
#feedControl .gf-snippet,
#feedControl .gf-author,
#feedControl .gf-spacer,
#feedControl .gf-relativePublishedDate {
display: none;
}
@rmasters
rmasters / antiblock.php
Created March 24, 2009 12:26
Antiblock proxy
<?php
/**
* Anti-block proxy
* @author Ross Masters <ross@php.net>
* @package antiblock
* @version 0.1
*/
// Bail on empty/unset url
if (!isset($_GET['url']) || empty($_GET['url'])) {
<?php
class FourChanPoster
{
const VERSION = "1.0";
public $name;
public $email;
public $password;
<?php
namespace Tuxxedo {
/**
* The class autoloader
*/
class Loader
{
/**
function closeIt()
{
return "Are you sure you want to leave this page?";
}
window.onbeforeunload = closeIt;
Itsy-bitsy spider decided to have a laugh,
So itsy-spider crept into a bath,
But along came Ross who didn't want to share his shower with a 5 inch spider so he blasted it down the plug hole.
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to support@mojang.com.
Please include a description of what you did when the error occured.
Note: Occurred during loading newly generated world - showed horizon, no blocks then crashed.