Skip to content

Instantly share code, notes, and snippets.

Avatar

Justin Rainbow justinrainbow

  • Phoenix, AZ
View GitHub Profile
View gist:4121808
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 Sep 5, 2012 — forked from jverdeyen/GetterSetterGenerator.py
Sublime Text 2 PHP Getter Setter Generator
View GetterSetterGenerator.py
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):
View flashpanels.php
<?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 Apr 22, 2011 — forked from antirez/compl1.rb
Redis autocompletion - in php
View compl1.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')) {
You can’t perform that action at this time.