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
| partner = Partner[:luxpo]; | |
| partner.extra_data[:default_layouts][:retargeting] = {anx_web: 'luxpo_retargeting_web', facebook: 'luxpo_retargeting_fb'}; | |
| partner.save; | |
| pas = PartnerAutomationSetting.find_by(partner_id: partner.id); | |
| unless pas.present? | |
| pas = PartnerAutomationSetting.create( | |
| automation_type: 'retargeting', | |
| send_email: false, | |
| launch_date: 1.year.ago, |
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 'openssl' | |
| class String | |
| def encrypt(key) | |
| cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt | |
| cipher.key = Digest::SHA1.hexdigest key | |
| s = cipher.update(self) + cipher.final | |
| s.unpack('H*')[0].upcase | |
| 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
| function go() { | |
| var userId = prompt('Username?', 'Guest'); | |
| // Consider adding '/<unique id>' if you have multiple games. | |
| var gameRef = new Firebase(GAME_LOCATION); | |
| assignPlayerNumberAndPlayGame(userId, gameRef); | |
| }; | |
| // The maximum number of players. If there are already | |
| // NUM_PLAYERS assigned, users won't be able to join the game. | |
| var NUM_PLAYERS = 4; |