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
| # This solution was based on https://gist.github.com/GlenCrawford/16163abab7852c1bd550547f29971c18 | |
| Rails.configuration.to_prepare do | |
| ActiveRecord::SchemaDumper.ignore_tables = %w[ | |
| salesforce._hcmeta | |
| salesforce._sf_event_log | |
| salesforce._trigger_log | |
| salesforce._trigger_log_archive | |
| ] | |
| end |
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
| # This script automatically reserves Wilson weightlifting slots. | |
| # usage: python GymScheduler.py --day=monday --startTime=9:20AM | |
| # use cron (unix) or TaskScheduler (windows) to get this to run automatically 48 hours before | |
| # you need selenium webdriver for chrome and selenium python bindings installed. | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from selenium.webdriver.common.by import By | |
| import sys, getopt |
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
| # Overrides Rails file activerecord/lib/active_record/schema_dumper.rb to | |
| # include all schema information in the db/schema.rb file, for example, in the | |
| # create_table statements. This allows for a working development database | |
| # to be built from a schema.rb file generated by rake db:schema:dump. | |
| # | |
| # This is essentially a rebuild of the "schema_plus_multischema" gem (which is | |
| # unfortunately only compatible with Rails ~> 4.2). | |
| # | |
| # Tested with Rails 6.0. |
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
| # Variant 1 | |
| def user_params(type) | |
| params.require(type.to_sym).permit(attributes) | |
| end | |
| # Variant 2 | |
| def user_params(type) | |
| case type | |
| when "user" | |
| params.require(:user).permit(user_attributes) |
After spending many hours trying to get FreeTDS and unixodbc to run on a Mac OS X 10.8 system with the python module, pyodbc, I eventually came to this recipe, which is remarkably simple thanks to homebrew. I also found unixodbc was unnecessary and I couldn't get it to play well with FreeTDS, so this install does not include unixodbc. See also http://www.acloudtree.com/how-to-install-freetds-and-unixodbc-on-osx-using-homebrew-for-use-with-ruby-php-and-perl/ and http://www.cerebralmastication.com/2013/01/installing-debugging-odbc-on-mac-os-x/.
Prerequisites: Be sure you have XCode and the Commandline Tools for XCode installed from Apple. Also install homebrew followed with brew update and brew doctor.
Install FreeTDS:
brew install freetds
Test your install: