Skip to content

Instantly share code, notes, and snippets.

@demonbane
demonbane / makeapp.sh
Created July 5, 2011 20:05
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"
/* XML Methods for MooTools */
/* Requires MooTools v1.3 */
var XML = {
rootFromFile: function(file){
var root = null;
switch (Browser.name){
case 'safari':
case 'chrome':
@arian
arian / Array.Iterator.js
Created October 18, 2010 16:32
Array.Iterator - Iterate trough your arrays
Array.implement({
i: 0,
current: function(){
return this.valid() ? this[this.i] : null;
},
jump: function(i){
if (i < 0) i = -1;
<?php
$output = '';
$tElementClass = !empty($tElementClass) ? $tElementClass : 'modSnippet';
$tStart = $modx->getMicroTime();
if (!empty($tElement)) {
switch ($tElementClass) {
case 'modChunk':
$output = $modx->getChunk($tElement, $scriptProperties);
break;