Skip to content

Instantly share code, notes, and snippets.

View paulcook's full-sized avatar

Paul Cook paulcook

  • OSU TCO
  • Columbus, OH
View GitHub Profile
@paulcook
paulcook / jquery_ui.rb
Created April 24, 2017 13:18 — forked from mttdffy/jquery_ui.rb
Capybara / Poltergeist helpers for JQuery UI
module JSHelpers
module JQueryUI
# type inside an autocomplete field and pick a value.
#
# @param [String] field selector of the autocomplete field
# @param [Hash] options details about what to search and what to select
# @param options [String] :with the text to type in the autocomplete field
# @param options [String] :select the text value of the autocomplete resuilt you
# want to pick. If this option is not present, the first result will be picked.
@paulcook
paulcook / mysql.rake
Created June 20, 2017 13:40 — forked from dfl/mysql.rake
rails rake tasks for dumping and reloading mysql databases
# mysql db backup and restore for rails
# by David Lowenfels <[email protected]> 4/2011
require 'yaml'
namespace :db do
def backup_prep
@directory = File.join(RAILS_ROOT, 'db', 'backup')
@db = YAML::load( File.open( File.join(RAILS_ROOT, 'config', 'database.yml') ) )[ RAILS_ENV ]
@db_params = "-u #{@db['username']} #{@db['database']}"