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() { | |
| $('#payment_sent_on_today').click(function() { | |
| var today = new Date(); | |
| $('#billable_payment_sent_on_1i').val(today.getFullYear()); | |
| $('#billable_payment_sent_on_2i').val(today.getMonth() + 1); | |
| $('#billable_payment_sent_on_3i').val(today.getDate()); | |
| return false; | |
| }); | |
| }); |
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
| fib = Hash.new {|h,n| h[n] = h[n-1] + h[n-2] } | |
| fib[0] = 0 | |
| fib[1] = 1 | |
| fib[11] # => 89 | |
| fib[12] # => 144 | |
| fib[101] # => 573147844013817084101 |
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
| # Based on Larry's and Damian's Perl6 talk at OSCON 2009 | |
| @fib = 0,1...&[+] |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.urgetopunt.backup</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/bin/ruby</string> | |
| <string>/Users/jparker/bin/backup.rb</string> |
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
| # config/app_config.yml | |
| development: | |
| key1: development value 1 | |
| test: | |
| key1: test value 1 | |
| production: | |
| key1: production value 1 |
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
| # config/initializers/load_config.rb | |
| APP_CONFIG = YAML.load_file("#{Rails.root}/config/app_config.yml")[Rails.env] |
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
| # config/app_config.yml | |
| development: | |
| key1: <%= # ruby code ... %> | |
| test: | |
| key1: <%= # ruby code ... %> | |
| production: | |
| key1: <%= # ruby code ... %> |
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
| # config/initializers/load_config.rb | |
| APP_CONFIG = YAML.load(ERB.new(File.read("#{Rails.root}/config/app_config.yml")).result)[Rails.env] |
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
| %tr | |
| %td= link_to "Details", billable | |
| %td= h billable.client.name | |
| %td= h billable.booking.date.to_s(:short) | |
| %td= h billable.agency.name | |
| %td= h billable.job_type.name | |
| %td= h truncate(billable.vendor.name) | |
| %td= h truncate(billable.project.name) | |
| %td= number_to_currency billable.base_rate | |
| %td= number_to_currency billable.gross_rate |
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
| %tr | |
| %td= link_to "Details", billable | |
| %td= h billable.client.name | |
| %td= h billable.booking.date.to_s(:short) | |
| %td= h billable.agency.name | |
| %td= h billable.job_type.name | |
| %td= h truncate(billable.vendor.name) | |
| %td= h truncate(billable.project.name) | |
| %td= number_to_currency billable.base_rate | |
| %td= number_to_currency billable.gross_rate |