Skip to content

Instantly share code, notes, and snippets.

@brianjmiller
brianjmiller / gist:1249009
Created September 28, 2011 19:39
Additional MakeNode _templateHandlers
Y.MakeNode.prototype._templateHandlers["@@"] = function (args) {
args = this._parseMakeNodeArgs(args);
if (args.length !== 2 || args[0] === "" || args[1] === "") {
return;
}
var av = this.get(args[0]);
if (! av) {
return;
}
return av.get(args[1]);
@brianjmiller
brianjmiller / gist:1189954
Created September 2, 2011 21:19
Camp installation notes
Per System:
open iptables to camp port ranges
set up Interchange::Deployment
set up camps
git clone
useradd camp
groupadd camp
createuser -PE camp
createdb camp
@brianjmiller
brianjmiller / gist:1125964
Created August 4, 2011 19:06
YUI_config succeeds with filter raw
{
"filter":"raw",
"comboBase":"/combo?",
"root":"ic/vendor/yui3/build/",
"base":"/ic/vendor/yui3/build/",
"combine":true,
"insertBefore":"styleoverrides",
"groups":{
"gallery":{
"combine":true,
@brianjmiller
brianjmiller / gist:1125951
Created August 4, 2011 19:02
YUI_config fails with no filter raw
Management Area
{
"comboBase":"/combo?",
"root":"ic/vendor/yui3/build/",
"base":"/ic/vendor/yui3/build/",
"combine":true,
"insertBefore":"styleoverrides",
"groups":{
"gallery":{
@brianjmiller
brianjmiller / gist:1076600
Created July 11, 2011 19:32
make_itl_loop_struct
#
# given an array of hash refs return a structure that is designed to used
# by one of IC's looping tags via the "list" attribute
#
sub make_itl_loop_struct {
my $self = shift;
my $data = shift;
unless (defined $data) {
Vend::Exception::ArgumentMissing->throw('data arg not provided');
" include other paths to look for config files
:set runtimepath=~/.vim,$VIMRUNTIME
" some basic options
:set nocompatible
:set showmatch
:set nowrap
:set ruler
:set showmode
:set backspace=2
@brianjmiller
brianjmiller / gist:1027681
Created June 15, 2011 18:00
Y.io with JSON parse
Y.io(
"/manage/Countries/options?_format=json",
{
on: {
success: Y.bind(
function (txnId, response) {
var new_data;
try {
new_data = Y.JSON.parse(response.responseText);
}
@brianjmiller
brianjmiller / gist:1017449
Created June 9, 2011 18:59
YUI AC with function as requestTemplate
// Y.IC.AutoComplete source: https://github.com/Wiggins/interchange_mvc/blob/master/share/ic/js/autocomplete.js
return new Y.IC.AutoComplete (
{
inputNode: input_node,
queryDelay: 300,
minQueryLength: 6,
resultListLocator: "results",
source: "/manage/LogisticsZoneServiceMaps/ac?_format=json&service_kind=delivery&",
requestTemplate: function (query) {
@brianjmiller
brianjmiller / gist:1014561
Created June 8, 2011 14:45
YUI3 panelesque
YUI.add(
"ui-window-tile",
function(Y) {
var Tile = Y.Base.create(
"ui_window_tile",
Y.Overlay,
[],
{
// TODO: make this a child of the window parent
_window: null,
Y.namespace('tnsg5').Tile = Y.Base.create("tile", Y.Widget,[], {
initializer: function () {
this.dataSource = this.getDataSourceInstance();
var dsCfg = {
request: "cb={}",
callback: {
//HERE IS WHERE THE FUNCTION IS ADDED
success: Y.bind(this.onSuccessfulLoad, this)