Skip to content

Instantly share code, notes, and snippets.

"autoload": {
"classmap": [
"database"
],
"psr-4": {
"app\\": "app/"
},
"files": [
"app/helpers/helpers.php"
]
var React= require('react/addons');
var Router = require('react-router');
var AppConstants = require('../../constants/AppConstants');
var GroupActionCreators = require('../../actions/GroupActionCreators');
var Link = Router.Link;
module.exports = React.createClass({
mixins: [Router.Navigation],
function createOption($listItem, $input)
{
$listItem.on('click tap', function(evt)
{
$input.prop('checked', ! $input.prop('checked'));
if ($input.is(':checked'))
{
$listItem.addClass('selected');
@jimrubenstein
jimrubenstein / gist:46ac06e3c6ab1f589419
Created September 5, 2014 18:33
arizona zip codes
zip_code,city,state
84536,Monument Valley,Arizona
85001,Phoenix,Arizona
85002,Phoenix,Arizona
85003,Phoenix,Arizona
85004,Phoenix,Arizona
85005,Phoenix,Arizona
85006,Phoenix,Arizona
85007,Phoenix,Arizona
85008,Phoenix,Arizona
<?php
function findObjectById($objects, $id)
{
foreach ($objects as $obj)
{
if ($obj->programId == $id)
{
return $obj;
}
@jimrubenstein
jimrubenstein / .htaccess
Created July 28, 2014 17:48
Dynamic sub-domain -> sub-folder webroot rewriting (more documentatino here: http://stackoverflow.com/a/17890602/109026)
# goes in folder that holds symlinks to project files (/home/jim/sites/dev)
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.]+)\.local.dev
RewriteCond %1::%{REQUEST_URI} !^(.*?)::/\1/
RewriteRule ^(.*)$ /%1/$1 [L]
RewriteCond %{HTTP_HOST} ^([^.]+)\.dev\.local
RewriteCond %1::%{REQUEST_URI} !^(.*?)::/\1/
RewriteRule ^(.*)$ /%1/$1 [L]
$generateKpiValue = function($metric_info) {
$words = explode('_', $metric_info['uid']);
array_shift($words);
return implode('', array_map('ucfirst', $words));
};

Keybase proof

I hereby claim:

  • I am jimrubenstein on github.
  • I am jrub (https://keybase.io/jrub) on keybase.
  • I have a public key whose fingerprint is 9A3E 223C B262 4C98 8EA3 2592 E80D ADCA E737 323D

To claim this, I am signing this object:

var Entry = (function($) {
function Entry(attributes) {
this.attributes = attributes;
}
Entry.prototype.get = function(attr) {
return this.attributes[ attr ] || null;
__d("adsAsyncUtils", [], function(a, b, c, d, e, f) {
var g = 30;
function h(arr, iter, progress) {
"use strict";
this.$ParallelForEach0 = arr; //array
this.$ParallelForEach1 = 1; //concurrency
this.$ParallelForEach2 = iter; //iterator
this.$ParallelForEach3 = progress; //progress complete
this.$ParallelForEach4 = 0; //working "threads"
this.$ParallelForEach5 = 0;