Skip to content

Instantly share code, notes, and snippets.

@ashleycoker
ashleycoker / gist.js
Created August 9, 2013 12:23
Lazy data associations in ExtJS 4
Ext.require([
'Ext.data.*',
'Ext.panel.Panel',
'Ext.layout.container.Card',
'Ext.tip.QuickTipManager'
]);
Ext.define('Customer', {
extend: 'Ext.data.Model',
fields: [{
@ashleycoker
ashleycoker / organisations.js
Created August 12, 2013 12:27
Updates organisation
/**
* Update organisation
*/
exports.update = function (req, res, next) {
var org = req.organisation;
org = _.extend(org, req.body);
org.save(function (err, org){
if ( err ) return next(err);
res.json({
$ sudo nano /private/etc/hosts
$ dscacheutil -flushcache
@ashleycoker
ashleycoker / TabMaster.js
Created September 2, 2013 12:00
Example of a listener for an arbitrary config
init: function () {
this.control({
'gridpanel[controlledByTabMaster=true]': {
render: this.onRender
}
});
},
[core]
ignorecase = true
git config --global core.ignorecase false
items: [
{
xtype: 'toolbar',
title: ' ', // if left blank this causes an issue on iPhone
docked: 'top',
cls: ['top', 'noBorder'],
items: [{
text: 'Orders',
cls: 'back-button',
itemId: 'back'
/**
* Offline Proxy
* @extend Ext.data.proxy.Ajax
*/
Ext.define('proxy.OfflineProxy', {
extend: 'Ext.data.proxy.Ajax',
alias: 'proxy.offline',
config: {
Ext.define('School.model.Student',
{
extend: 'Ext.data.Model',
requires:['School.model.Course'],
idProperty : 'id',
fields : [{
name : 'id',
type : 'int'
},
{