Skip to content

Instantly share code, notes, and snippets.

View sergiomichels's full-sized avatar

Sérgio Michels sergiomichels

View GitHub Profile
@melix
melix / body.tpl
Last active August 12, 2019 01:04
An example of improved template composition using fragments and the MarkupTemplateEngine
html {
head {
title(title)
}
body {
content()
}
}
public enum AnimalType {
DOG {
public Animal createAnimal() {
return new Dog();
}
},
CAT {
public Animal createAnimal() {
return new Cat();
@mitchellsimoens
mitchellsimoens / app.js
Created May 22, 2013 15:59
fullscreen config from ST2 comes to Ext JS 4 (unofficially)
Ext.define('Override.AbstractComponent', {
override : 'Ext.AbstractComponent',
fullscreen : false,
constructor : function() {
var me = this,
viewport = Ext.Viewport;
me.callParent(arguments);
@colinramsay
colinramsay / extjs4-treefilter.js
Created February 10, 2012 12:58
Add filtering to Ext JS 4's TreePanel (Ext.tree.Panel)
/**
* Add basic filtering to Ext.tree.Panel. Add as a mixin:
* mixins: {
* treeFilter: 'MyApp.lib.TreeFilter'
* }
*/
Ext.define('MyApp.lib.TreeFilter', {
filterByText: function(text) {
this.filterBy(text, 'text');
},