Skip to content

Instantly share code, notes, and snippets.

var template = '<div>{content}</div>';
function getContent(json) {
return handlebars(template, json);
}
// Exemplo
getContent({
content: 'oii'
<portlet:renderURL var="myResourceURL">
<portlet:param name="mvcPath" value="/my_file.jsp" />
<portlet:param name="redirect" value="<%= currentURL %>" />
<portlet:param name="myCustomParam" value="{myCustomParam}" />
</portlet:renderURL>
var resourceURL = A.Lang.sub(
decodeURIComponent('<%= myResourceURL %>'),
{
myCustomParam: myCustomParam
<!doctype html>
<html lang="en">
<head>
<meta charset="ISO-8859-1">
<title>Document</title>
</head>
<div id="special"></div>
<div id="escaped"></div>
<body>
<script>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script>
var valid = '<div></div>';
var invalid = '<script></script>';
<h1>Content 1</h1>
<a href="content2.html">Link from HTML snippet being intercepted</a><br>
[alias]
co = checkout
ci = commit
cp = cherry-pick
rb = rebase
st = status
br = branch
df = diff
who = shortlog -s --
sync-origin = "!sh -c 'git pull --rebase upstream master && git push origin master'"
[alias]
co = checkout
ci = commit
cp = cherry-pick
rb = rebase
st = status
br = branch
df = diff
who = shortlog -s --
sync-origin = "!sh -c 'git pull --rebase upstream master && git push origin master'"
<?xml version="1.0"?>
<project name="dotfiles" basedir=".">
<target name="release">
<delete dir="alloy-2.0.0pr1/.git" />
<delete dir="alloy-2.0.0pr1/.DS_Store" />
<zip basedir="alloy-2.0.0pr1" comment="AlloyUI 2.0.0pr1" destfile="alloy-2.0.0pr1.zip" />
</target>
</project>
<div id="pagination" class="aui-pagination">
<ul class="aui-pagination-content">
<li><a href="#">Prev</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">Next</a></li>
</ul>
</div>
// Simple version of http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
function isEventSupported(node, eventName) {
eventName = 'on' + eventName;
if (!(eventName in node)) {
if (!node.setAttribute) {
node = document.createElement('div');
}
if (node.setAttribute) {