Skip to content

Instantly share code, notes, and snippets.

View zenorocha's full-sized avatar

Zeno Rocha zenorocha

View GitHub Profile
/**
* TODO. Wanna help? Please send a Pull Request.
*
* @attribute alwaysShowContainer
* @default false
* @type Boolean
*/
alwaysShowContainer: {
value: false
}
/**
* TODO. Wanna help? Please send a Pull Request.
*
* @method _addSuggestion
* @param content
* @protected
*/
_addSuggestion: function(content) {
// Method content
}
@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',
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@zenorocha
zenorocha / html5-demos.md
Last active April 19, 2019 02:14
The HTML5 Amount of Awesomeness (work in progress)

The HTML5 Amount of Awesomeness

Rainbox Vomit

A collection of freaking awesome HTML5 demos (work in progress).

WebGL

@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 / multiple-3rd-party-widgets.js
Last active November 14, 2022 12:18
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@zenorocha
zenorocha / aui-pagination+datatable.html
Created February 25, 2013 19:11
AlloyUI: Pagination + Datatable
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pagination + Datatable</title>
<!-- AlloyUI -->
<link rel="stylesheet" href="http://cdn.alloyui.com/2.0.0pr2/aui-css/css/bootstrap.min.css">
<script src="http://cdn.alloyui.com/2.0.0pr2/aui/aui-min.js"></script>
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', {