Skip to content

Instantly share code, notes, and snippets.

View justinrainbow's full-sized avatar

Justin Rainbow justinrainbow

View GitHub Profile
@justinrainbow
justinrainbow / gist:4121808
Created November 20, 2012 22:49 — forked from w33ble/gist:4121706
blah
function DataSourceQueue(config) {
// console.log(config, Y.DataSource.Local.transactions);
this._ds = config.host;
this.transactions = [];
this._ds.after('request', this.add, this);
this._ds.on('response', function(e) {
console.log('DS response', e.tId);
@justinrainbow
justinrainbow / GetterSetterGenerator.py
Created September 5, 2012 15:33 — forked from jverdeyen/GetterSetterGenerator.py
Sublime Text 2 PHP Getter Setter Generator
import sublime, sublime_plugin, re, os
# TODO
# check indention (spaces/tabs/size, current indention )
# insert right where the pointer is, or insert right before the closing } of the class?
# check of these generator getter/setters already exist? make it idempotent?
class GeneratorCommand(sublime_plugin.TextCommand):
def fixup(self, string):
@justinrainbow
justinrainbow / flashpanels.php
Created April 25, 2012 18:35 — forked from aforwark/flashpanels.php
flash panel plugin
<?php
/*
Plugin Name: Flash Panels
Description: This plugin handles the flash panels that can be used on SheKnows Blogs
*/
class FlashPanelPostType
{
private $args = array(
'labels' => array(),
@justinrainbow
justinrainbow / compl1.php
Created April 22, 2011 19:12 — forked from antirez/compl1.rb
Redis autocompletion - in php
<?php
# compl1.php - Redis autocomplete example
# download female-names.txt from http://antirez.com/misc/female-names.txt
$redis = new Redis();
$redis->connect('127.0.0.1');
# Create the completion sorted set
if (!$redis->exists('compl')) {