Skip to content

Instantly share code, notes, and snippets.

View jshirley's full-sized avatar

Jay Shirley jshirley

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

Worklog for 2016-01-11

What must I do today?

@jshirley
jshirley / gae_test.go
Created January 4, 2016 03:49
This shows a failing test that I'm unable to figure out what I'm doing wrong.
package hello
import (
"appengine/aetest"
"appengine/datastore"
"reflect"
"testing"
)
type Foo struct {
@jshirley
jshirley / gist:9863326
Created March 29, 2014 21:27
My "Solve a Problem" paper for Dan Ariely's Behavioral Economics course.

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
jshirley / gist:9744173
Created March 24, 2014 16:46
Failing example with ActiveRecord 4.1.0rc1
# 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)
### Keybase proof
I hereby claim:
* I am jshirley on github.
* I am jshirley (https://keybase.io/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
jshirley / install_plenv.yml
Created November 29, 2013 19:33
Start of the plenv ansible gist that I'm using for TDP
---
- name: plenv | update plenv repo
git: repo=git://github.com/tokuhirom/plenv.git dest=$plenv_root
sudo: True
sudo_user: ${plenv_user}
- name: plenv | install perl-build
git: repo=git://github.com/tokuhirom/Perl-Build.git dest=/home/{{ plenv_user }}/.plenv/plugins/perl-build
sudo: True
sudo_user: ${plenv_user}
@jshirley
jshirley / gist:6312764
Created August 22, 2013 21:05
Parse the TDP v1 /goals API result to find cooldown goals "expiration" date
#!env perl
use JSON;
use DateTimeX::Easy;
use Data::Printer;
my $json = JSON::decode_json(<STDIN>);
my $goals = $json->{goals};
@jshirley
jshirley / usblamp.js
Created November 9, 2012 17:01
Using Node + node-hid to control the Dream Cheeky USB LED Light on OS X
var HID = require('HID'),
path;
HID.devices().forEach( function(device) {
if ( device.product.match(/Dream Cheeky/) ) {
console.log(device);
path = device.path;
}
});