View loop.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
exclude-result-prefixes="xsl"> | |
<xsl:template name="loop"> <!-- Loop --> | |
<xsl:param name="i" /> | |
<xsl:param name="limit" /> | |
<xsl:call-template name="loop-item"> |
View gist:582324
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<xsl:apply-templates select="/data/categories/entry[not(parent)]" /> | |
</ul> | |
<xsl:template match="categories/entry"> | |
<xsl:param name="path" select="''" /> | |
<li id="{title/@handle}"> | |
<a href="{$root}{$path}{title/@handle}/"> | |
<xsl:value-of select="title" /> |
View gist:629706
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function grab(&$param_pool=NULL){ | |
// I am not able to access $param_pool, so I'm taking a detour via Frontend::Page() | |
$page = Frontend::Page(); | |
// CREATE XML DOCUMENT | |
$doc = new DOMDocument; | |
$root = $doc->createElement($this->dsParamROOTELEMENT); | |
$doc->appendChild($root); | |
// APPEND ARTICLES |
View field.date.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Class fieldDate extends Field{ | |
const SIMPLE = 0; | |
const REGEXP = 1; | |
const RANGE = 3; | |
const ERROR = 4; | |
private $key; |
View gist:721650
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<!-- | |
ISO-8859-1 based URL-encoding demo | |
Written by Mike J. Brown, mike@skew.org. | |
Updated 2002-05-20. | |
No license; use freely, but credit me if reproducing in print. |
View e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# = 0 ]; then | |
killall gedit &> /dev/null | |
/usr/bin/gedit "$(pwd)/$(ls -1p | grep -v \/$ | head -n 1)" &> /dev/null & | |
else | |
/usr/bin/gedit "$@" &> /dev/null & | |
fi |
View rgb-to-hex.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
exclude-result-prefixes="xsl"> | |
<xsl:template name="rbga-to-hex"> | |
<xsl:param name="rgba-val"/> | |
<xsl:param name="count" select="1"/> | |
<xsl:variable name="val" select="substring-before($rgba-val,',')"/> | |
<xsl:variable name="tail" select="substring-after($rgba-val,concat($val,','))"/> |
View gist:756141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<![CDATA | |
dies ist ein Test | |
]]> | |
Hallo | |
<p> | |
Testparagraph | |
</p> |
View clone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd $(pwd) | |
git clone $1 . | |
git submodule update --init | |
git remote rm origin | |
git remote add upstream $1 | |
git remote add origin $2 | |
# | |
# Put this file in any of the directories of your PATH (try echo $PATH to see them) | |
# |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Makefile for Palm WebOS SDK | |
# | |
# By default, this Makefile installs and launches apps on the Emulator. To override this | |
# behaviour override the variable DEVICE to be "usb". i.e. make reinstall DEVICE=usb | |
# | |
PACKAGE = com.yourdomain.yourapp | |
DEVICE = tcp | |
LEVEL = info |
OlderNewer