I want to prompt for some specific questions and then insert them into a template.
In no particular order:
- title
- description
- qa plan
#!/bin/bash | |
# Enables automatic rebase when pulling for each existing branch in your | |
# projects. This is useful in conjunction with the 'branch.enablerebase always' | |
# option, which enables this setting on new branches but leaves existing | |
# branches intact. | |
# | |
# Pass this a directory which contains all of your projects and it will enable | |
# thie option for all existing local branches in each Git repo within it. |
# setup from controller and model code | |
params = {game_id: 3598462, play_by_play_string: true} | |
sort_order = [:play_index, :asc] | |
plays = Play.where(:game_id => params[:game_id]).order_by(sort_order) | |
plays = plays.first.class.prune_plays(plays) | |
methods = [:initial_screen] | |
play_by_play_string = params[:play_by_play_string] | |
if play_by_play_string | |
methods = plays.first.class.play_by_play_methods | |
end |
# plain ActiveRecord | |
Benchmark.measure do | |
User.where(:activated => true).limit(200000).map(&:first_name) | |
end | |
# => 58.210000 12.970000 71.180000 ( 73.134415) | |
# writing the improved SQL by hand | |
Benchmark.measure do | |
ActiveRecord::Base.connection.select_all("select * from users where activated = 1 limit 200000").map { |attrs| attrs[:first_name] } | |
end |
Gem::Specification.new do |s| | |
s.name = 'google_bot_aware' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Romain Champourlier' | |
s.email = '[email protected]' | |
s.summary = 'Google Bot Aware' | |
s.description = "Strip extra characters from Google Bot's Accept header so that Rails knows to use default MIME type in response." | |
s.files = ['google_bot_aware.rb'] |
# put this in lib or a gem or something | |
class NonProductionInterceptor | |
def self.delivering_email(message) | |
# implement some mechanism to strip non-example.com and non-tstmedia.com email | |
# addresses from the delivery lists. also verify that if no delivery emails are | |
# left, either drop the email (if possible) or add [email protected] or some | |
# other dummy address so no exception is raised when attempting to deliver. | |
# | |
# Feel free to crib from TstMailer, of course. | |
# |
#!/bin/bash | |
name=$1 | |
echo Hello, $name! How are you? |
#!/bin/bash | |
main() { | |
CURRENT_ORG=$1 | |
NEW_ORG=$2 | |
STARTING_DIR=$(pwd) | |
# bomb out if not given current and new org names | |
[ -z $CURRENT_ORG ] || [ -z $NEW_ORG ] && missing_arguments |
These instructions focus on performing Automation commands for our Node.js applications. Additional work is required to run the applications, and further work to run our Rails applications.
NOTE: Let's try skipping this whole section for newly set up laptops. The addition of brew install gcc-apple42
below should eliminate this necessity.
Unicorn was by far the best performing (5.94 trans/sec over the 1-minute test, 352 total). Puma (3.95 trans/sec, 235 total) appeared to perform no better than Webrick, despite the default behavior of using up to 16 threads. Perhaps increasing its worker count to the number of cores will improve its performance.
I've tried to run multiple Puma workers with the workers
directive (per their sample documentaiton), but I receive errors about undefined method 'workers' for #<Puma::Configuration::DSL:0x007ffca4bde798>
).
$ bundle exec rails server