- balanced_controller.rb
- _bank_account_form.html.haml
- _credit_card_form.html.haml
- bank_account_submission.js
- credit_card_submission.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Adapted from a C# example here: | |
| # http://stackoverflow.com/questions/43224/how-do-i-calculate-a-trendline-for-a-graph | |
| # And thanks to John Esser for helping figure out how to | |
| # calculate the targets to stabilize a negative slope! | |
| class LinearRegression | |
| attr_accessor :slope, :intercept | |
| # Pass in an array of values to get the regression on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| group :development do | |
| # tools | |
| gem 'rails3-generators' | |
| gem 'letter_opener' | |
| gem 'database_cleaner' | |
| gem 'yajl-ruby' | |
| gem 'crack' | |
| gem 'quiet_assets' | |
| #gem 'ruby_gntp' # growl notifications |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :deploy do | |
| task :setup_solr_data_dir do | |
| run "mkdir -p #{shared_path}/solr/data" | |
| end | |
| end | |
| namespace :solr do | |
| desc "start solr" | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec sunspot-solr start --port=8983 --data-directory=#{shared_path}/solr/data --pid-dir=#{shared_path}/pids" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run with: rake environment elasticsearch:reindex | |
| namespace :elasticsearch do | |
| desc "re-index elasticsearch" | |
| task :reindex => :environment do | |
| klass = Place | |
| ENV['CLASS'] = klass.name | |
| ENV['INDEX'] = new_index = klass.tire.index.name << '_' << Time.now.strftime('%Y%m%d%H%M%S') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #!/usr/local/bin/python | |
| """ | |
| To use this script, you must be in the root directory of a Rails project that | |
| is using git. You should also make sure that your directory does not contain any | |
| uncommitted changes. Then run: | |
| $ python rails_switch_branch.py name_of_another_branch | |
| Running the above will do the following: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Trailing Spaces' default settings. | |
| // | |
| // In order to tweak the settings, you should NOT edit this file, but instead | |
| // the user-specific, empty-by-default version under "Preferences / Package | |
| // Settings / Trailing Spaces / Settings - User". | |
| // | |
| // See Trailing Spaces' README for detailled instructions. | |
| { | |
| // By default, Trailing Spaces is "live". It means the trailing spaces | |
| // regions will be matched in the background, and highlighted if a color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "default_encoding": "UTF-8", | |
| "default_line_ending": "unix", | |
| "detect_indentation": false, | |
| "draw_white_space": "all", | |
| "ensure_newline_at_eof_on_save": false, | |
| "file_exclude_patterns": | |
| [ | |
| ".DS_Store", | |
| "Desktop.ini", |