Skip to content

Instantly share code, notes, and snippets.

View zenorocha's full-sized avatar

Zeno Rocha zenorocha

View GitHub Profile
@zenorocha
zenorocha / audio.sublime-snippet
Created December 26, 2012 16:26
HTML5 Audio Snippet for Sublime Text 2
<snippet>
<content><![CDATA[
<audio controls>
<source src="${1:file}.ogg" type="audio/ogg">
<source src="${1:file}.mp3" type="audio/mpeg">
<source src="${1:file}.wav" type="audio/wav">
</audio>
]]></content>
<tabTrigger>audio5</tabTrigger>
</snippet>
@zenorocha
zenorocha / docpad.js
Created December 28, 2012 00:17
Docpad Tasks on Yogi Alloy
/*
* Copyright (c) 2012, Liferay Inc. All rights reserved.
* Code licensed under the BSD License:
* https://github.com/liferay/alloy-ui/blob/master/LICENSE.txt
*
* @author Zeno Rocha <zeno.rocha@liferay.com>
*/
// -- Yogi Alloy Header --------------------------------------------------------
var YOGI_PATH = process.env.YOGI_PATH,
@zenorocha
zenorocha / 1.html
Last active December 11, 2015 05:28
jQuery - YUI - AlloyUI: Rosseta Stone
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$('div.foo:first')</title>
</head>
<body>
<div class="foo" id="1"></div>
<div class="foo" id="2"></div>
AUI().use('aui-node', 'aui-io-request', function(A) {
A.one('#myButton').on('click', function() {
loadAnotherContent();
});
function loadAnotherContent() {
A.io.request('http://alloyui.com/io/data/content.html', {
@zenorocha
zenorocha / docpad.coffee
Created April 20, 2013 22:42
ConfBoilerplate - Multiple Rooms Suggestion
module.exports =
prompts: false
# These are variables will be accessible via our templates
templateData:
# Conference info
conf:
name: "Conference name"
@zenorocha
zenorocha / maxLength.js
Last active December 17, 2015 02:29
AlloyUI - Form Validator - MaxLength
YUI().use('aui-form-validator', function(Y) {
var myRules = {
myField: {
maxLength: 50
}
};
new Y.FormValidator({
boundingBox: '#myForm',
/**
* TODO. Wanna help? Please send a Pull Request.
*
* @method _addSuggestion
* @param content
* @protected
*/
_addSuggestion: function(content) {
// Method content
}
/**
* TODO. Wanna help? Please send a Pull Request.
*
* @attribute alwaysShowContainer
* @default false
* @type Boolean
*/
alwaysShowContainer: {
value: false
}
@zenorocha
zenorocha / js-learning-resources.md
Last active December 31, 2015 11:48
So do you want to learn JavaScript?!