Skip to content

Instantly share code, notes, and snippets.


Kris Luminar kris-luminar

  • West Des Moines, IA, United States
View GitHub Profile
View Gemfile
source ""
ruby "2.1.2"
# gem 'sinatra'
gem 'eventmachine'
gem "cookiejar", :git => ""
gem "restforce"
gem 'faye', '0.8.9'
gem 'pry'
View salesforce_streaming_api_test.rb
require 'restforce'
require 'faye'
require 'pry'
Restforce.log = true
client = username: '**********************************',
password: '************************',
security_token: '************************',
client_id: '*************************************************************************************',
kris-luminar / gist:be20aef88e91e7af5816
Last active Aug 29, 2015
Iowa Ruby Brigade Regex 1/20/2015
View gist:be20aef88e91e7af5816
kris-luminar / toggle_dev_environment.js
Created Mar 23, 2012 — forked from esundahl/env.json
View toggle_dev_environment.js
var dev = "dev",
staging = "staging",
production = "production",
url = window.location,
hostname = window.location.hostname;
hostname = hostname.split('.');
if (hostname[1] === dev) {
hostname[1] = staging;
kris-luminar / env.json
Created Mar 28, 2012 — forked from esundahl/env.json
This is a quick and dirty little javascript bookmarklet that I wrote to toggle between different development environments
View env.json
"environments": [
View gist:3709942
Image: 400900309.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 227x150+0+0
Resolution: 150x150
Print size: 1.51333x1
Units: PixelsPerInch
Type: TrueColor
Endianess: Undefined
Colorspace: sRGB
View bob_test.rb
if (Bob.is_a?(Robert) )
puts "yes, he is"
puts "no, he isn't"
puts "He's a swell fellow, either way"
kris-luminar / puppy.feature
Created Nov 24, 2012
Ambiguous match of "its name is Fred":
View puppy.feature
Feature: Puppies are very cute and everyone wants one
In order to make everyone happy
As a puppy class programmer
I want to give everyone a cute virtual puppy
Scenario: The puppy is being pet
Given we have a puppy
And its name is Fred
When we pet the puppy
Then the puppy wags its tail
View gist:4263503
diff --git i/vendor/plugins/addressable/lib/addressable.rb w/vendor/plugins/addressable/lib/addressable.rb
index 59e402c..054a9b5 100644
--- i/vendor/plugins/addressable/lib/addressable.rb
+++ w/vendor/plugins/addressable/lib/addressable.rb
@@ -116,7 +116,7 @@ module Addressable
if has_latlng_fields?
build_geocode unless geocode
- if address.blank? and latitude.blank? and longitude.blank?
+ if address.blank? and latitude.to_f == 0.0 and longitude.to_f == 0.0
kris-luminar / gist:4752280
Created Feb 11, 2013
trying to create an integration spec to test a nested resource (location is a nested resource of mailbox).
View gist:4752280
require 'spec_helper'
feature "Editing mailboxes" do
scenario "Updating a mailbox" do
let!(:mailbox) { Factory(:mailbox) }
let!(:location) { Factory(:location, :street_one => "6th NE", :street_two => "Kent NE", :zip => '99999', :city => "Auburn", :state => 'WA', :mailbox => mailbox) }
visit '/'
click_link '6th NE and Kent NE'
click_link 'Edit mailbox'
You can’t perform that action at this time.