Skip to content

Instantly share code, notes, and snippets.

<entry gd:etag="W/&quot;CE4EQn47eCp7ImA9WhZUFko.&quot;">
<id>tag:youtube.com,2008:video:Nujoj5yRWTE</id>
<published>2011-06-10T02:28:23.000Z</published>
<updated>2011-06-10T02:28:23.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://gdata.youtube.com/schemas/2007#video"/>
<category scheme="http://gdata.youtube.com/schemas/2007/categories.cat" term="Entertainment" label="Entertainment"/>
<category scheme="http://gdata.youtube.com/schemas/2007/keywords.cat" term="106 Weston Street"/>
<category scheme="http://gdata.youtube.com/schemas/2007/keywords.cat" term="London property"/>
<category scheme="http://gdata.youtube.com/schemas/2007/keywords.cat" term="Tim Murphy"/>
<category scheme="http://gdata.youtube.com/schemas/2007/keywords.cat" term="IP Global"/>
@digibutt
digibutt / gist:1120012
Created August 2, 2011 11:07
A basic Ext.TabPanel
var tabs = new Ext.TabPanel({
renderTo: Ext.getBody(),
activeTab: 0,
items: [{
title: 'Hello',
html: 'World!'
}]
});
@digibutt
digibutt / gist:1120091
Created August 2, 2011 12:30
jQuery DomReady Hello World!
$(document).ready(function(){
alert('HELLO WORLD');
});
@digibutt
digibutt / gist:1228932
Created September 20, 2011 11:55
Log a hit in a plugin in MODX
$tv = $modx->getObject('modTemplateVar', array('name' => 'hitcount'));
$criteria = array(
'tmplvarid' => $tv->get('id'),
'contentid' => $modx->resourceIdentifier
);
if(!$tvResource = $modx->getObject('modTemplateVarResource', $criteria)){
$tvResource = $modx->newObject('modTemplateVarResource');
$tvResource->set('value', 1);
@digibutt
digibutt / gist:1269576
Created October 7, 2011 06:08
htaccess
# MODX supports Friendly URLs via this .htaccess file. You must serve web
# pages via Apache with mod_rewrite to use this functionality, and you must
# change the file name from ht.access to .htaccess.
#
# Make sure RewriteBase points to the directory where you installed MODX.
# E.g., "/modx" if your installation is in a "modx" subdirectory.
#
# You may choose to make your URLs non-case-sensitive by adding a NC directive
# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
@digibutt
digibutt / gist:1302987
Created October 21, 2011 02:45
getResourceAsPlaceholder
<?php
/*
Call it like this:
[[getResourceAsPlaceholder?
&id=`10`
&prefix=`doc.`
&separator=`.`
@digibutt
digibutt / gist:1797680
Created February 11, 2012 07:56
Basic HTML markup
<!doctype html>
<head>
</head>
<body>
<div id="page"></div>
</body>
@digibutt
digibutt / gist:1797749
Created February 11, 2012 08:01
Hello World JS
var element = document.getElementById('page');
element.innerHTML = 'Ni Hao Shi Jie!';
@digibutt
digibutt / gist:1797756
Created February 11, 2012 08:05
Hello World jQuery
$(document).ready(function(){
$('#page').text("Ni Hao Shi Jie!");
});
@digibutt
digibutt / gist:1797766
Created February 11, 2012 08:17
Ext JS Hello World!
Ext.onReady(function(){
var helloWorldHongKongStyle = new Ext.form.Label({
text: 'Ni Hao Shi Jie!'
,renderTo: 'page'
});
});