Skip to content

Instantly share code, notes, and snippets.

View pjdonnelly's full-sized avatar

Paul Donnelly pjdonnelly

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Seon-Wook Park</author>
<sampleQuery>select * from {table}</sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="JSON">
@pjdonnelly
pjdonnelly / index.js
Created February 13, 2013 23:56
voxel.js game
var createGame = require('voxel-engine')
function sphereWorld(x, y, z) {
// return the index of the material you want to show up
// 0 is air
if (x*x + y*y + z*z > 15*15) return 0
return 3
}
var game = createGame({
@pjdonnelly
pjdonnelly / gist:3146899
Created July 19, 2012 21:19
Sample YQL table with y.pipe method
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author></author>
<description></description>
<documentationURL></documentationURL>
<sampleQuery>select * from {table}</sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="XML">

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For less, I'm using the ruby version because this is what they suggest on the website. The javascript version may be different.

Variables

@pjdonnelly
pjdonnelly / yql3leggedexample.php
Created November 8, 2010 07:55
Example of 3 legged OAuth with php/yql
<?php
include_once("lib/Yahoo.inc"); //located at https://github.com/yahoo/yos-social-php
//get your keys from https://developer.apps.yahoo.com/dashboard/createKey.html
define("API_KEY","<YOUR_KEY_HERE>");
define("SHARED_SECRET","<YOUR_SECRET_HERE>");
YahooLogger::setDebug(true); //optional debug output.
$session=YahooSession::requireSession(API_KEY, SHARED_SECRET);