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
| puts "Hello world!" |
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
| [1] pry(main)> item = CoinDenominations::Item.last | |
| CoinDenominations::Item Load (0.3ms) SELECT `coin_denominations_items`.* FROM `coin_denominations_items` ORDER BY `coin_denominations_items`.`id` DESC LIMIT 1 | |
| => #<CoinDenominations::Item id: 7627, reference: "138", values: [{"value"=>1, "enabled_since_level"=>1, "enabled_until_level"=>999}], created_at: "2015-07-01 08:32:46", updated_at: "2015-07-31 14:53:17", set_variant_id: 1> | |
| [2] pry(main)> item.values.each { |v| v.enabled_until_level = 777 } | |
| => [#<CoinDenominations::ItemValue:2226062820 value: 1 enabled_since_level: 1 enabled_until_level: 777] | |
| [3] pry(main)> item.save | |
| (0.2ms) BEGIN | |
| CoinDenominations::Item Exists (0.3ms) SELECT 1 AS one FROM `coin_denominations_items` WHERE (`coin_denominations_items`.`reference` = BINARY '138' AND `coin_denominations_items`.`id` != 7627 AND `coin_denominations_items`.`set_variant_id` = 1) LIMIT 1 | |
| SQL (0.2ms) UPDATE `coin_denominations_items` SET `updated_at` = '2015-07-31 14:54:08', `values` = '---\n- v |
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
| // Bot for http://gabrielecirulli.github.io/2048/ | |
| FakeActuator = function() {} | |
| FakeActuator.prototype.actuate = function () { | |
| } | |
| score = 0; | |
| max = 0; | |
| while (max < 1024) { |
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 TimestampsPatch | |
| extend ActiveSupport::Concern | |
| included do | |
| remove_method :timestamps | |
| end | |
| # Monkey patch: make timestamps not-nullable by default. | |
| def timestamps(*args) | |
| options = args.extract_options! |