Skip to content

Instantly share code, notes, and snippets.


Jay Shirley jshirley

View GitHub Profile
jshirley / .rubocop-todo.yml
Last active May 18, 2016
rubocop Exclude relative path bug
View .rubocop-todo.yml
- 'rel/path/broken.rb'
View jira_import_issue.json
"projects": [
"name": "Sample data",
"key": "SAM",
"issues": [
"status" : "Open",
"reporter" : "admin",
"summary" : "Parent case",
title date tags
Worklog for 2016-01-11

Worklog for 2016-01-11

What must I do today?

jshirley / gae_test.go
Created Jan 4, 2016
This shows a failing test that I'm unable to figure out what I'm doing wrong.
View gae_test.go
package hello
import (
type Foo struct {
jshirley / gist:9863326
Created Mar 29, 2014
My "Solve a Problem" paper for Dan Ariely's Behavioral Economics course.
View gist:9863326

Leveraging Technology to Increase Pain of Paying and Improve Personal Savings

As technology advances, people are getting further from the hard concept of money. Without seeing immediate feedback, people repeat undesired behaviors without having any pain. The tendency to repeat previous behaviors without thinking of the original motivation has been observed (Ariely, D. & Norton, M. I., 2008). This behavior may cause repeated purchases without adequate deliberate decision-making.

This problem is exacerbated by the reduction of the pain of paying as the distance from physical currency increases (Ariely and Silva, 2002). We are increasingly moving towards electronic payments and this trend will not reverse (Borzekowski, Kiser, Ahmed, 2006).

The convenience of credit and debit payments directly reduces pain, in combination of self-herding leads people to inadequately consider other aspects of the purchase. With the exception of frugal individuals, people do not automatically think about the opportunity cost o

jshirley / gist:9744173
Created Mar 24, 2014
Failing example with ActiveRecord 4.1.0rc1
View gist:9744173
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.1.0rc1'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
View gist:9530304
### Keybase proof
I hereby claim:
* I am jshirley on github.
* I am jshirley ( on keybase.
* I have a public key whose fingerprint is 97AE 5583 48ED EBC0 4545 6CA1 A1E6 4CBB 40B2 552B
To claim this, I am signing this object:
jshirley / install_plenv.yml
Created Nov 29, 2013
Start of the plenv ansible gist that I'm using for TDP
View install_plenv.yml
- name: plenv | update plenv repo
git: repo=git:// dest=$plenv_root
sudo: True
sudo_user: ${plenv_user}
- name: plenv | install perl-build
git: repo=git:// dest=/home/{{ plenv_user }}/.plenv/plugins/perl-build
sudo: True
sudo_user: ${plenv_user}
jshirley / gist:6312764
Created Aug 22, 2013
Parse the TDP v1 /goals API result to find cooldown goals "expiration" date
View gist:6312764
#!env perl
use JSON;
use DateTimeX::Easy;
use Data::Printer;
my $json = JSON::decode_json(<STDIN>);
my $goals = $json->{goals};
jshirley / usblamp.js
Created Nov 9, 2012
Using Node + node-hid to control the Dream Cheeky USB LED Light on OS X
View usblamp.js
var HID = require('HID'),
HID.devices().forEach( function(device) {
if ( device.product.match(/Dream Cheeky/) ) {
path = device.path;