Skip to content

Instantly share code, notes, and snippets.

View kingcoyote's full-sized avatar

Steve Phillips kingcoyote

View GitHub Profile
<?php
// this is right
if(isset($_SESSION['oauth_access_token'])) {
$client->setAccessToken($_SESSION['oauth_access_token']);
} else {
$token = $client->authenticate();
$_SESSION['oauth_access_token'] = $token;
}
var person = function() { // define the blueprint for the person object
this.name = ""; // set name and age defaults
this.age = "";
};
person.prototype.talk = function() {
alert("My name is " + this.name + " and I am " + this.age + " years old.");
}
var steve = new person();
var add_term = function(json) {
var i = 0, j = 0, k = 0,
sections = ["noun", "verb", "adjective"],
tbody = document.getElementById('results_tbody'),
tr, td, word;
//tbody.innerHTML = "";
for(i in sections) {
j = 0;
commit 6f773ea96e4d799585062f08ce7fcdec2234e024
Merge: d2a986f 0148672
Author: Steve <steve@drupal.(none)>
Date: Fri Feb 3 08:29:31 2012 -0800
Merge /home/steve/www/canvas/invadinspace
commit 01486726da955e4c01346324ee590969b2c3e896
Author: Steve <steve@drupal.(none)>
Date: Fri Feb 3 08:28:59 2012 -0800
$('table.priceForm tr th.subhead').click(function() {});
$('table.priceForm').on('click', 'tr th.subhead', function() {});
<html>
<head>
<body>
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
if ($row['staffid.id']== $selectid) {
$counter++;
echo "<tr><td class='pad'><font class=content>";
echo "{$row['Year']}";
echo "</font></td><td></td><td><font class=content>";
echo "{$row['Counselor_Role']}";
1e
this line is 30 characters lon
2c
g, while this line is 44 characters long.
an
21
d this line is 33 characters long
<?php
function unchunk($result) {
return preg_replace_callback(
'/(?:(?:\r\n|\n)|^)([0-9A-F]+)(?:\r\n|\n){1,2}(.*?)'
.'((?:\r\n|\n)(?:[0-9A-F]+(?:\r\n|\n))|$)/si',
create_function(
'$matches',
'return hexdec($matches[1]) == strlen($matches[2]) ?
$matches[2] :
@kingcoyote
kingcoyote / GameLayer.js
Created August 20, 2012 20:56
layer example for cocos2d-javascript keyboard control
var cocos = require('cocos2d')
, geo = require('geometry')
, Player = require('/Player')
/**
* @class Initial application layer
* @extends cocos.nodes.Layer
*/
function GameLayer () {
// You must always call the super class constructor