Skip to content

Instantly share code, notes, and snippets.

Evan Prothro eprothro

Block or report user

Report or block eprothro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eprothro
eprothro / PEC Action Required
Created Jan 31, 2012
PEC Clean Water Action
View PEC Action Required
Date: January 30, 2012
R.B. Sloan
Chief Executive Officer
Pedernales Electric Cooperative
P.O. Box 1
Johnson City, TX 78636
Dear PEC Bard Members and PEC Staff:
View gist:2705416
source :rubygems
gem 'rails', '3.1.2'
gem 'asset_sync', '~> 0.4.1'
gem 'awesome_print', '~> 1.0.2'
gem 'authorize-net', '~> 1.5.2'
gem 'cells', '~> 3.8.3'
gem 'countries', '~> 0.8.2'
gem 'dalli', '~> 2.0.4'
View gist:2705420
source :rubygems
gem 'rails', '3.1.2'
gem 'asset_sync', '~> 0.4.1'
gem 'awesome_print', '~> 1.0.2'
gem 'authorize-net', '~> 1.5.2'
gem 'cells', '~> 3.8.3'
gem 'countries', '~> 0.8.2'
gem 'dalli', '~> 2.0.4'
View gist:2773124
tddium suite
Looks like you haven't set up a suite on this computer for youversion-web/mobile...
Enter a repo name or press 'Return'. Using 'youversion-web' by default: 'youversion-web/mobile'
... Detected branch mobile
... Detected ruby ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin11.2.0]
... Detected bundle Bundler version 1.1.3
... Detected gem 1.8.15
>>> Tddium selects tests to run by default (e.g., in CI) by matching against a
list of Ruby glob patterns. Use "," to join multiple globs.
@eprothro
eprothro / cache.rake
Last active Dec 14, 2015
A simple rake file with tasks to: 1) clear the rails cache 2) give statistics for a memcache protocol store (e.g., Dalli)
View cache.rake
namespace :cache do
task :clear => :environment do
puts "=> Clearning Rails cache..."
Rake::Task["cache:stats"].invoke
puts "\n `Rails.cache.clear` => " + Rails.cache.clear.to_s + "\n\n"
# manually reset the stats, as clearing the cache doesn't do so
Rails.cache.dalli.reset_stats if Rails.cache.try(:dalli).respond_to? :reset_stats
Rake::Task["cache:stats"].reenable
@eprothro
eprothro / gist:5065952
Last active Dec 14, 2015
not crap makes...
View gist:5065952

Importing images for models done with missing images for the following 76 models:

  • /hyundai/elantra.jpg
  • /hyundai/azera.jpg
  • /honda/goldwing.jpg
  • /nissan/maxima_3.5.jpg
  • /saturn/ion.jpg
  • /chevrolet/k_1500.jpg
  • /chevrolet/c150.jpg
  • /chevrolet/express.jpg
@eprothro
eprothro / communication via narrative.md
Last active Feb 6, 2017
Connextra, Gherkin, and Free-form prose for multidisciplinary communication via narrative.
View communication via narrative.md

Overview

Getting clients, managers, project managers, designers, and developers on the same page when it comes to feature expectations is hard. Everyone speaking the same language (literally) can go a long way to achieving the same, metaphorically.

There are three common formats that are great for written and verbal communication between stakeholders with different backgrounds, responsibilities, and risk exposures. They are each natural-language, narrative formats (they use plain english) that anyone can understand, but their structrued nature is proven to help clearly communicate behavior, specify intent and synchronize expectations.

Connextra user stories

  • Great for high level feature description
  • Typically bad for detailed behavior description
@eprothro
eprothro / shards.yml
Created Apr 12, 2013
Dynamic Octopus configuration for master/slave horizontal DB scaling with a Rails application on the Heroku stack. See the wiki page for more info: https://github.com/tchandy/octopus/wiki/Replication-with-Rails-on-Heroku. Props to Heroku for the idea, gleaned from the dynamic database.yml they inject at build-time for rails apps.
View shards.yml
<%
require 'cgi'
require 'uri'
def attribute(name, value, force_string = false)
if value
value_string =
if force_string
'"' + value + '"'
else
@eprothro
eprothro / octopus.rb
Last active Dec 16, 2015
Octopus initializer for use with master/slave horizontal DB scaling with a Rails application on the Heroku stack. See the wiki page for more info: https://github.com/tchandy/octopus/wiki/Replication-with-Rails-on-Heroku
View octopus.rb
module Octopus
def self.shards_in(group=nil)
config[Rails.env].try(:[], group.to_s).try(:keys)
end
def self.followers
shards_in(:followers)
end
class << self
alias_method :followers_in, :shards_in
alias_method :slaves_in, :shards_in
View feature behavior description
### <Feature name, noun>
#### Feature Description
```cucumber
As a User
I want to <do something conceptually simple>
So that <motivation for doing that thing>
```
-----
You can’t perform that action at this time.