Skip to content

Instantly share code, notes, and snippets.

View apipkin's full-sized avatar
🤖
^_^

Anthony Pipkin apipkin

🤖
^_^
View GitHub Profile
Y.io("/site/index.php?page=deckManager",{method:'POST',data:'name=inner&target=dNum'});
// should be
Y.io("/site/index.php?page=deckManager",{method:'POST',data:'name=' + inner + '&target=' + dNum});
YUI.use('json','io','node',function(Y){
var ioConfig = {
method : 'POST',
data : 'cardId=34',
url : 'myIOHandler.php',
on : {
success : function(id,o,args){
var json = Y.JSON.parse(o.responseText);
if(json.remove === 'success') {
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Title</title>
</head>
<body>
<div id="pageWrapper">
<div id="page">
<div id="headWrapper"><div id="head"></div></div>
var node = Y.Node.create('<link rel="stylesheet" id="css' +
contentObject[target]['page'] +
'" type="text/css" href="css/ppip/' +
contentObject[target]['page'] + '.css" />');
Y.log(node);
Y.one('head').appendChild(node);
// try
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoloader()
{
$loader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Application_',
'basePath' => dirname(__FILE__)
));
<?php
function loopDir($path = null) {
if($path === null) {
$path = './';
}
$d = dir($path);
$arr = array();
while(false !== ($f = $d->read())) {
<?php
function loopDir($path = './') {
$d = dir($path);
$files = array();
$dirs = array();
while(false !== ($f = $d->read())) {
if ($f === "." || $f === "..") {
<?php
ini_set('display_errors', 1);
/**
* Class to handle thumbnail generation and caching
*/
class Thumber
{
/**
<ul>
<li class="folder folder-closed"><a href="#">Folder 1</a></li>
<li class="folder folder-closed"><a href="#">Folder 2</a>
<ul>
<li class="file"><a href="#">File 1</a></li>
<li class="file"><a href="#">File 2</a></li>
</ul>
</li>
<li class="folder folder-open"><a href="#">Folder 2</a>
<ul>
for (var count = 1; count <= 20; count++) {
var t = 'This is a line number: ' + count + '. ';
if(count % 5 === 0) {
t += '-- This line is a multiple of five.';
}
document.write(t + '<br/>');
}