Skip to content

Instantly share code, notes, and snippets.

<?php
require_once("../yosdk/yahoo-yos-social-php5-86eef28/lib/OAuth/OAuth.php");
$consumer = new OAuthConsumer($_GET['cKeyInputField'], $_GET['cSecretInputField']);
$api_endpoint = 'http://test.erikeldridge.com/hak/cck.php';
$params = array('pAppid' => $_REQUEST['pAppid']);
$params = array('name' => $_REQUEST['name']);
$params = array('description' => $_REQUEST['description']);
@erikeldridge
erikeldridge / yui3-string-utils.js
Created May 9, 2010 10:09
a YUI 3 module for string utilities
// a YUI 3 module for string utilities
// ref: http://developer.yahoo.com/yui/3/yui/#yuiadd
YUI.add( 'string', function(Y) {
// parseUri 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
// Source: http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js
// Retrieved: 5/10/10
@erikeldridge
erikeldridge / yql_util.rb
Created May 14, 2010 07:33
A convenience function for making a call to YQL from Ruby
# This is a convenience function for making a call to YQL from Ruby
# License: Yahoo! BSD http://gist.github.com/375593
# Usage: http://erikeldridge.wordpress.com/2010/02/18/ruby-yql-utility-function-example/
require 'net/http'
require 'rubygems'
require 'json'
def yql(query)
uri = "http://query.yahooapis.com/v1/public/yql"
@erikeldridge
erikeldridge / openid_debug_util.php
Created May 15, 2010 00:48
PHP code for OpenID authentication w/ debug output
<?php // simple code to require OpenID authentication on a page
/*
Requirements:
* PHP 5
* OpenID Enabled PHP library (http://openidenabled.com/php-openid/)
Usage:
1) Put this code in a file on your server
2) Load the page in a browser
@erikeldridge
erikeldridge / yqlLogger.js
Created May 16, 2010 03:00
A convenience fn for adding meta data to the log in YQL
/**
* A convenience fn for adding meta data to the log in YQL
*
* Usage:
* 1) copy/paste this code into your YQL table's execute block
* 2) Edit the tableName var to match your table's name
* 3) To log the message 'aloha' on line 25, call the logger like this: logger( 'aloha', 25 );
* 4) Look in the diagnostics section of your YQL output to see the log entry
*
* License: Yahoo! BSD http://gist.github.com/375593
@erikeldridge
erikeldridge / OAuthMonkey.php
Created May 18, 2010 07:02
a php script that uses the standard oauth lib to do the oauth dance
<?php // a php script that uses the standard oauth lib (via yos sdk) to do the oauth dance
/**
* Requirements:
* - PHP5
* - YOS PHP5 SDK: http://github.com/yahoo/yos-social-php5
*/
require('../yosdk/yahoo-yos-social-php5-86eef28/lib/OAuth/OAuth.php');
require('../yosdk/yahoo-yos-social-php5-86eef28/lib/Yahoo/YahooOAuthApplication.class.php');
<?php
// http://github.com/yahoo/yos-social-php5
require('../yosdk/yahoo-yos-social-php5-86eef28/lib/OAuth/OAuth.php');
require('../yosdk/yahoo-yos-social-php5-86eef28/lib/Yahoo/YahooOAuthApplication.class.php');
if( $_REQUEST['submit'] ){
$app = new YahooOauthApplication( $_REQUEST['key'], $_REQUEST['secret'], null, $_REQUEST['callback'] );
$token = $app->getRequestToken( $_REQUEST['callback'] );
<script src="http://yui.yahooapis.com/3.2.0/build/simpleyui/simpleyui-min.js"></script>
<script>
Y.one("#foo").addClass("highlight");
</script>
@erikeldridge
erikeldridge / gist:595988
Created September 24, 2010 20:31
basic yui 3 horiz slider
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Basic Sliders</title>
<style type="text/css">
/*margin and padding on body element
can introduce errors in determining
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- <s cript type="text/javascript" src="http://yui.yahooapis.com/3.2.0pr2/build/simpleyui/simpleyui-min.js"></script> -->
<script type="text/javascript" src="http://isithackday.com/hacks/geo/yql-geo-library/yqlgeo.js"></script>
</head>
<body>