Skip to content

Instantly share code, notes, and snippets.

View bmoeskau's full-sized avatar
Too much coffee

Brian Moeskau bmoeskau

Too much coffee
View GitHub Profile
@bmoeskau
bmoeskau / install.sh
Last active September 1, 2021 20:56
NVM install script
#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
nvm_has() {
type "$1" > /dev/null 2>&1
}
nvm_grep() {
GREP_OPTIONS='' command grep "$@"
{% extends "layouts/main.html" %}
{% block page_title %}Services{% endblock %}
{% set page = 'services' %}
{% if error %}
<h2>Oops</h2>
<p>{{ error }}</p>
@bmoeskau
bmoeskau / gist:2024448
Created March 12, 2012 20:22
Ext containers should have explicit layout!
Ext.define('Extensible.calendar.form.EventWindow', {
layout: 'fit', // added this
// etc.
});
(function(fm) {
function f0(out,values,parent,xindex,xcount) {
try { with(values) {
return(weeks)
}} catch(e) {}
}
function f5(out,values,parent,xindex,xcount) {
return values
}
function f8(out,values,parent,xindex,xcount) {
Ext.onReady(function() {
Ext.create('Ext.form.Panel', {
title: 'FieldContainer Example',
width: 550,
bodyPadding: 10,
items: [{
xtype: 'myFancyMultiField',
fieldLabel: 'Foo',
labelWidth: 100
},{
Ext.onReady(function() {
Ext.create('Ext.form.Panel', {
title: 'FieldContainer Example',
width: 550,
bodyPadding: 10,
items: [{
xtype: 'fieldcontainer',
fieldLabel: 'Foo',
labelWidth: 100,
layout: 'auto',
Ext.onReady(function() {
Ext.create('Ext.form.Panel', {
title: 'FieldContainer Example',
width: 550,
bodyPadding: 10,
items: [{
xtype: 'fieldcontainer',
fieldLabel: 'Foo',
labelWidth: 100,
layout: 'hbox',
// Overriding via the string class name will lazy-override the class:
Ext.override('Ext.Panel', {
// override the default value of a config:
frame: true,
// override a method:
setTitle: function(newTitle) {
this.callOverridden(['First: ' + newTitle]);
}
});
@bmoeskau
bmoeskau / gist:1062008
Created July 3, 2011 06:37
Fix for deferredRender getting bypassed by certain container setups
Ext.layout.container.AbstractCard.override({
renderChildren: function () {
if (!this.deferredRender) { // <-- added this check
this.getActiveItem();
this.callParent();
}
}
});
Ext.override('ClassToOverride', {
someMethod: function() {
return 'overridden';
}
});
var theClass = Ext.define('ClassToOverride', {
someMethod: function() {
return 'original';
},
anotherMethod: function() {