Skip to content

Instantly share code, notes, and snippets.

View davidhund's full-sized avatar

David Hund davidhund

View GitHub Profile
@davidhund
davidhund / getBundles install
Created October 1, 2011 11:10
Installing GetBundles on a Fresh Copy of TextMate
# Installing GetBundles on a Fresh Copy of TextMate
# Taken directly from: http://solutions.trey.cc/2009/02/25/installing-getbundles-on-a-fresh-copy-of-textmate/
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd !$
svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/
osascript -e 'tell app "TextMate" to reload bundles'
@davidhund
davidhund / cUrl to Gist
Created October 1, 2011 11:49
Create a Gist (of 2 files) through the GitHub API with cUrl
# Create a Gist (of 2 files) through the GitHub API
# ..uses cUrl but could of course also be done through PHP etc.
curl -H "Content-Type: application/json" -d '{"description": "Your XPATHr Gist test","public": true,"files": {"test.xml": {"content": "Paste your XML code.."},"test.xsl": {"content": "Paste your XSL code here.."}}}' 'https://api.github.com/gists'
@davidhund
davidhund / Fugly IE CC
Created October 21, 2011 11:47
@roy asked why I disliked the H5BP IE conditional comments on the HTML element. https://twitter.com/#!/roy/status/127347118540193792
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<!-- VERSUS -->
@davidhund
davidhund / master.xml
Created November 21, 2011 15:07
Order unorderable nodes :)
<data>
<random-cta-buttons>
<section id="5" handle="cta-buttons">CTA Buttons</section>
<entry id="5">
<internal-page-link>
<page handle="contact" id="50">Contact</page>
</internal-page-link>
<label handle="wat-kan-ik-doen">Wat kan ik doen?</label>
<special-type>
<item handle="help">help</item>
@davidhund
davidhund / Clone-Just-One-Gist-File.md
Created December 6, 2011 13:32
Can I clone/submodule one of multiple files in a Gist?

Gist files contain multiple files

Sometimes… So, when I'd like to clone or submodule just one of those files (like only this one), how do I do that?

Halp!?

@davidhund
davidhund / time-ago-friendly-NL.xsl
Created December 6, 2011 14:31
Time Ago (Friendly) Dutch (NL)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:math="http://exslt.org/math" extension-element-prefixes="date math">
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Author: https://github.com/brendo
Modifications: I translated this to Dutch and created a Gist ;)
Description: See http://symphony-cms.com/download/xslt-utilities/view/25156/
@davidhund
davidhund / xslt-html-ninja.xsl
Created December 7, 2011 14:35
Symphony XSLT HTML Ninja Technique
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Name: HTML Manipulation
Version: 1.0
Author: Allen Chang <allen@chaoticpattern.com>
URL: http://symphony-cms.com/download/xslt-utilities/view/20035/
Description:
@davidhund
davidhund / multilevel-xslt-navigation.xsl
Created December 7, 2011 14:51
Symphony XSLT Multilevel Navigation
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Taken from: http://symphony-cms.com/download/xslt-utilities/view/35067/
-->
<xsl:template match="navigation">
<ul id="menu">
<xsl:apply-templates select="page">
@davidhund
davidhund / dabblet.css
Created January 16, 2012 09:19
Centered content in horizontal bands without wrapper?
/**
* Centered content in horizontal bands without wrapper?
*/
html,body {
background-color: #FFF;
color: #333;
margin: 0; padding:0;
font: 16px/32px Arial, sans-serif;
}
@davidhund
davidhund / em-based-mq-issue.css
Created May 3, 2012 13:31
em-based Media Queries issue...
/* EM BASED MQ-ISSUE?
in html: <meta name="viewport" content="initial-scale=1.0, width=device-width"/>
*/
/* Why does the following MQ not apply on my iPhone 3GS?!
PS: I *know* this is, strictly speaking, not a test for an iPhone.
That just happens to be my current test-device ;)
PS: if I check with JS: window.width == '480px' :/ */
*/