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 User < ActiveRecord::Base | |
acts_as_authentic do |c| | |
c.transition_from_restful_authentication = true | |
#AuthLogic defaults | |
#c.validate_email_field = true | |
#c.validates_length_of_email_field_options = {:within => 6..100} | |
#c.validates_format_of_email_field_options = {:with => email_regex, :message => I18n.t(‘error_messages.email_invalid’, :default => “should look like an email address.”)} | |
#c.validate_password_field = true | |
#c.validates_length_of_password_field_options = {:minimum => 4, :if => :require_password?} |
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
#!/usr/bin/env ruby | |
# Given a file containing one word per line, print out all the combinations of | |
# words that are anagrams; each line in the output should contain a set of | |
# input words that are anagrams of each other. No word should appear in the | |
# output more than once. | |
# | |
# For added programming pleasure, find the longest words that are anagrams, | |
# and the set of anagrams containing the most words. |
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
module Spree | |
module TableNameHelpers | |
activators_table_name = Spree::Activator.table_name | |
addresses_table_name = Spree::Address.table_name | |
alerts_table_name = Spree::Alert.table_name | |
assets_table_name = Spree::Asset.table_name | |
calculators_table_name = Spree::Calculator.table_name | |
configurations_table_name = Spree::Configuration.table_name | |
countries_table_name = Spree::Country.table_name | |
credit_cards_table_name = Spree::Creditcard.table_name |
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
0 tests, 0 assertions, 0 failures, 0 errors | |
Using the ci profile... | |
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.spree/order" is no longer supported | |
.............................name: ascend_by_master_price | |
arguments: [] | |
wrong number of arguments (1 for 0) | |
/Users/macbookair/Sites/SPREE/spree/core/app/models/spree/product_scope.rb:29:in `ascend_by_master_price' | |
/Users/macbookair/Sites/SPREE/spree/core/app/models/spree/product_scope.rb:29:in `send' | |
/Users/macbookair/Sites/SPREE/spree/core/app/models/spree/product_scope.rb:29:in `apply_on' | |
/Users/macbookair/Sites/SPREE/spree/core/app/models/spree/product_scope.rb:45:in `check_validity_of_scope' |
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
#!/usr/bin/env ruby -wKU | |
require 'fileutils' | |
paths = ["/Applications/Microsoft Office 2011/", | |
"/Applications/Remote Desktop Connection", | |
"/Applications/Microsoft Communicator", | |
"/Applications/Microsoft Messenger", | |
"/Users/username/Library/Preferences/Microsoft/Office 2011/", | |
"/~/Library/Application Support/Microsoft/", | |
"/~/Documents/Microsoft User Data/", | |
"/Library/Automator", |
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
{ | |
06012012 = ( | |
{ | |
end = 1325854800; | |
id = 16; |
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
TODO | |
---- | |
Day View: | |
----------------- | |
1. Date header is blue if today else grey | |
2. Arrow should change to dark version on hover and toggle back on release | |
3. Change the header to loading.. or use loading indicator while waiting for the JSON message fetch | |
4. Vertical align the time and event title | |
5. If Event has location, the row should be like this: |
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
order_number = 'R4678748' | |
o = Order.find_by_number(order_number) | |
adjustment_amount = o.total | |
rma_adjustment = o.adjustments.find_by_adjustment_source_type('ReturnAuthorization') | |
rma_adjustment.amount = rma_adjustment.amount - adjustment_amount |
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
== Month View | |
------------- | |
1. Month Grid: | |
- Date number must be centered horizontally | |
- 'Today' tile color change from 'WHITE' to 'DARK PINK' with Shadow Inset, see picture: http://www.iphonefreak.com/wp-content/uploads/2010/06/iphone_4_calendar.jpg | |
2. Event Listing: | |
- add one 1px line border-top for Event Listing block (ask me if you don't understand) | |
- all-day color must be black instead of red |
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
Calendar | |
tweaks to text and layout as per visual | |
enable view buttons from all views: LIST, DAY, MONTH | |
Details view: add location, link, RSVP by date, and fine-tune layout style | |
Fix bar initially appearing below month view |
OlderNewer