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
| def self.schedule_announcement(email_name,users = nil,time_to_run = nil) | |
| lim = Rails.env == "production" ? nil : 175 | |
| users ||= self.address_completed.select("users.id").limit(lim).all | |
| time_to_run ||= Time.now | |
| group_size = 50 | |
| groups = users.count / group_size | |
| (groups + 1).times do |i| | |
| group_start = i * group_size |
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
| class ListingWindow | |
| SKIP_N_PERIODS = { | |
| "exclusive" => 1, | |
| "pickable" => 2 | |
| } | |
| WINDOW_TIMES = [9,18] | |
| LISTING_TIME_ZONE = "Pacific Time (US & Canada)" | |
| #LISTING_TIME_ZONE = "UTC" |
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
| function resetData { | |
| mysql -u root --execute="DROP DATABASE ${1:-thredup3_development};" | |
| mysql -u root --execute="CREATE DATABASE ${1:-thredup3_development};" | |
| gzip -d ./tmp/thredup.sql.gz | |
| mysql -u root ${1:-thredup3_development} < ./tmp/thredup.sql | |
| mysql -u root ${1:-thredup3_development} < ./db/clean_test_data.sql | |
| } |
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
| @paperclip_defaults = { | |
| :styles => { | |
| :large=>{ | |
| :convert_options=>"-auto-orient -strip", | |
| :whiny=>true, | |
| :geometry=>"400x300^" | |
| }, | |
| :thumb=>{ | |
| :convert_options=>"-auto-orient -strip", | |
| :whiny=>true, |
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 | |
| # Install RVM | |
| bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
| # Modify ~/.bash_profile as necessary and source it to bring in changes | |
| echo "[[ -s \"\$HOME/.rvm/scripts/rvm\" ]] && source \"\$HOME/.rvm/scripts/rvm\"" >> ~/.bash_profile | |
| source ~/.bash_profile | |
| # Install and use Ruby 1.9.2 | |
| rvm install ruby-1.9.2-p0 && rvm use 1.9.2 | |
| # Create a gemset for and install Rails 3 RC | |
| rvm gemset create tu3 && rvm use 1.9.2@tu3 |
NewerOlder