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 LeaseDeal < ApplicationRecord | |
| def self.expire_all(time: Time.current, batch_size: 1000) | |
| in_batches(of: batch_size).update_all(expired_at: time) | |
| end | |
| 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
| UPDATE "lease_deals" | |
| SET "expired_at" = '2018β10β08 23:50:50.138061' | |
| WHERE "lease_deals"."expired_at" IS NULL | |
| AND "lease_deals"."dealership_id" = 1234 | |
| AND ( updated_at < '2018β10β08 23:47:32.862470' ) |
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 LeaseDeal < ApplicationRecord | |
| def self.expire_all(time: Time.current) | |
| update_all(expired_at: time) | |
| end | |
| 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
| class Array | |
| alias βͺ << | |
| alias π΄ concat | |
| alias π§ drop | |
| alias π each | |
| alias π³β empty? | |
| alias π sample | |
| alias π² sample | |
| alias β»οΈ shuffle | |
| alias π push |
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
| require 'minitest/autorun' | |
| require 'minitest/emoji' | |
| module MiniTest | |
| class Emoji | |
| add_utf_theme :carwow, 0x1f3ce, 0x1f694, 0x1f690, 0x1f6b6 | |
| end | |
| end | |
| describe Cow do |
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 Cow | |
| def πͺ | |
| "π₯© " | |
| end | |
| end | |
| π = Cow.new | |
| puts π.πͺ # => π₯© |
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
| eyJ2ZXJzaW9uIjoxLjMsImZlYXR1cmVzIjp7ImxvY2F0aW9uIjp7InJvb20iOnRydWUsIm91dHNpZGUiOnRydWUsIndvcmxkIjp0cnVlLCJzcGFjZVNoaXAiOnRydWV9fSwic3RvcmVzIjp7Indvb2QiOjY1MjUsIm1lYXQiOjU2MzAsImJhaXQiOjczOSwic2NhbGVzIjo2NywidGVldGgiOjUwNCwiZnVyIjoyMzAwNCwiY2xvdGgiOjIzNywiY2hhcm0iOjYsImN1cmVkIG1lYXQiOjQzMCwiY29tcGFzcyI6MSwibGVhdGhlciI6MTAxOCwibWVkaWNpbmUiOjUsImJvbmUgc3BlYXIiOjEsInRvcmNoIjo5NSwibCBhcm1vdXIiOjEsIndhdGVyc2tpbiI6MSwicnVja3NhY2siOjEsImlyb24iOjU4MiwiaXJvbiBzd29yZCI6MCwiY2FzayI6MSwid2Fnb24iOjEsInN0ZWVsIHN3b3JkIjoyLCJzdGVlbCI6NDU4LCJpIGFybW91ciI6MSwiY29hbCI6MjgzLCJidWxsZXRzIjo0NjcsImJvbGFzIjoyLCJzIGFybW91ciI6MSwiY29udm95IjoxLCJ3YXRlciB0YW5rIjoxLCJyaWZsZSI6NSwiYmF5b25ldCI6MCwic3VscGh1ciI6NDE0LCJhbGllbiBhbGxveSI6MCwiZW5lcmd5IGNlbGwiOjEyLCJsYXNlciByaWZsZSI6MX0sImNoYXJhY3RlciI6eyJwdW5jaGVzIjo0MCwic3RhcnZlZCI6MSwicGVya3MiOnsic3RlYWx0aHkiOnRydWUsInNjb3V0Ijp0cnVlfX0sImluY29tZSI6eyJnYXRoZXJlciI6eyJkZWxheSI6MTAsInN0b3JlcyI6eyJ3b29kIjoyNX0sInRpbWVMZWZ0Ijo4fSwiYnVpbGRlciI6eyJkZWxheSI6MTAsInN0b3JlcyI6eyJ3b29kIjoyfSwidGltZUxlZnQi |
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
| 127, 63, 95, 31, 111, 47, 79, 15, 119, 55, 87, 23, 103, 39, 71, 7, 123, 59, 91, 27, 107, 43, 75, 11, 115, 51, 83, 19, 99, 35, 67, 3, 125, 61, 93, 29, 109, 45, 77, 13, 117, 53, 85, 21, 101, 37, 69, 5, 121, 57, 89, 25, 105, 41, 73, 9, 113, 49, 81, 17, 97, 33, 65, 1, 126, 62, 94, 30, 110, 46, 78, 14, 118, 54, 86, 22, 102, 38, 70, 6, 122, 58, 90, 26, 106, 42, 74, 10, 114, 50, 82, 18, 98, 34, 66, 2, 124, 60, 92, 28, 108, 44, 76, 12, 116, 52, 84, 20, 100, 36, 68, 4, 120, 56, 88, 24, 104, 40, 72, 8, 112, 48, 80, 16, 96, 32, 64, 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
| MissyElliott.encode("How is this even possible?!") | |
| # => "\xF6\x84\x88\xFD\xB4\x98\xFD\xE8\xF4\xB4\x98\xFD\xAC\xC8\xAC\xC4\xFD\xF8\x84\x98\x98\xB4\xDC\xE4\xAC\x81\xBD" | |
| MissyElliott.encode("\xF6\x84\x88\xFD\xB4\x98\xFD\xE8\xF4\xB4\x98\xFD\xAC\xC8\xAC\xC4\xFD\xF8\x84\x98\x98\xB4\xDC\xE4\xAC\x81\xBD") | |
| # => "How is this even possible?!" | |
| MissyElliott.decode("How is this even possible?!") | |
| # => "\xF6\x84\x88\xFD\xB4\x98\xFD\xE8\xF4\xB4\x98\xFD\xAC\xC8\xAC\xC4\xFD\xF8\x84\x98\x98\xB4\xDC\xE4\xAC\x81\xBD" | |
| MissyElliott.decode("\xF6\x84\x88\xFD\xB4\x98\xFD\xE8\xF4\xB4\x98\xFD\xAC\xC8\xAC\xC4\xFD\xF8\x84\x98\x98\xB4\xDC\xE4\xAC\x81\xBD") |