This file contains hidden or 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
// pulled from example.js | |
var directive = { | |
'li': { | |
'child <- children': { | |
'a': 'child.name', | |
'a@onclick':'alert(\'#{child.name}\');', | |
'div.children': function(ctxt){ | |
return ctxt.child.item.children ? rfn(ctxt.child.item):''; | |
} |
This file contains hidden or 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
# Get a list of available VMs: | |
VBoxManage list vms | |
# Start one of the VMs w/o starting a gui | |
VboxHeadless -s VMname & | |
# Run your web server inside a headless VM. Or an SSH server, etc. |
This file contains hidden or 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
/* | |
Innershiv from J.D. Bartlett | |
*/ | |
window.innerShiv = (function() { | |
var d, r; | |
return function(h, u) { |
This file contains hidden or 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
/* Bien sur, cet exemple utilise jQuery... */ | |
$(function() { | |
$('article').each(function() { | |
var $a = $(this), | |
$link = $('<a>').attr( | |
{ | |
href: $a.attr('cite'), | |
text: $a.attr('title') | |
}, true |
This file contains hidden or 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
<article title="Le titre de mon article machin" | |
cite="http://example.com/url/to/article.html" | |
pubdate="2010-06-08T00:00:00Z"> | |
<p> | |
le contenu de l'article et un peu de lorem ipsum et | |
<a href="#">un lien pour voir</a> pis kin, un <b>gras</b>! | |
</p> | |
</article> |
This file contains hidden or 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
body{ | |
line-height:1.5em; | |
font-size:16px; | |
font-family:sans-serif; | |
} | |
article{ | |
font-size:1em; | |
display:block; | |
width:30em; | |
padding:0.5em 0.75em; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<meta name="description" content="description"> | |
<title>Page Title</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
This file contains hidden or 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
/* | |
"unsafe" JSON converters, allows one to also include functions | |
(does nto support native functions but an example workaround is given) | |
*/ | |
JSON.unsafeStringify = function(obj){ | |
if(typeof obj == 'object'){ | |
if(obj instanceof Array) for(var i=0;i<obj.length;i++) obj[i] = JSON.unsafeStringify(obj[i]); |
This file contains hidden or 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
/* | |
This method plays on heideggerian theories. | |
It makes a method of Das Man -- or one that is unready-to-hand -- | |
available ready-to-hand on a specified Dasein. | |
*/ | |
var changeBeing = function(method,dasein){ | |
return function readyToHand(){ |
This file contains hidden or 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
/// THIS IS BROKEN, NEW VERSION TO COME... watch for it in my repos. | |
/* PraizedActionFacade.js 0.1 - "Facade Pattern" to simplify Praizd API actions for tempalte building | |
* | |
* Author: Francois Lafortune | |
* Copyright (c) 2010 PraizedMedia Inc. | |
* | |
* REQUIRES jsonPath() http://goessner.net/articles/JsonPath/ | |
* I felt I should stress this: jsonPath does most of what's magic here and save a lot of lines of code | |
* in doing so... |