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
| setupOneSignal(){ | |
| this.oneSignal.startInit('ab4692d4...'); | |
| this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.Notification); | |
| this.oneSignal.handleNotificationReceived().subscribe((jsonData) => { | |
| if (jsonData.isAppInFocus){ | |
| let alert = this.alertCtrl.create({ | |
| title: notification.title, | |
| message: notification.body, |
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 OneSignal | |
| APP_ID = 'ONE_SIGNAL_APP_ID' | |
| API_KEY = 'ONE_SIGNAL_APP_KEY' | |
| def initialize(title, body, data, players) | |
| @title, @body, @data, @players = title, body, data, players | |
| end | |
| def perform | |
| params = { |
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 jquery.maskMoney | |
| //= require jquery.mask | |
| var Mask = { | |
| phoneMasks: ['(00) 00000-0000', '(00) 0000-00000'], | |
| maskBehavior: function (val, e, field, options){ | |
| return val.length > 14 ? Mask.phoneMasks[0] : Mask.phoneMasks[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
| class String | |
| def to_delocalized_decimal | |
| delimiter = I18n::t('number.format.delimiter') | |
| separator = I18n::t('number.format.separator') | |
| self.gsub(/[#{delimiter}]/, '').gsub(separator, '.') | |
| end | |
| def to_delocalized_money | |
| unit = I18n::t('number.currency.format.unit') | |
| delimiter = I18n::t('number.currency.format.delimiter') |
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
| <script src="//i.btg360.com.br/bs.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| __bsd["id"] = "258:1"; | |
| __bsd["debug"] = true; | |
| __bsd["track"] = "on"; | |
| try { | |
| bs.setaCliente({ | |
| "email": "bfscordeiro@gmail.com" | |
| }); |
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 MyJob | |
| include Delayed::ScheduledJob | |
| run_every 1.hour | |
| end | |
| class MyJob2 | |
| include Delayed::ScheduledJob | |
| run_every 1.day |
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
| void getAndPrintGameTable(){ | |
| char gamesTable[12800]; | |
| memset(gamesTable, 0, 12800); | |
| int iRet; | |
| GL_Dialog_Message(xGoal, NULL, "Aguarde...", GL_ICON_INFORMATION, GL_BUTTON_NONE, 0); | |
| iRet = GetJsonFromServer("GET_GAMES_TABLE", gamesTable); | |
| if (iRet >= 0) | |
| printGameTable(gamesTable); |
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
| # Capistrano configuration | |
| # | |
| # require 'new_relic/recipes' - Newrelic notification about deployment | |
| # require 'capistrano/ext/multistage' - We use 2 deployment environment: staging and production. | |
| # set :deploy_via, :remote_cache - fetch only latest changes during deployment | |
| # set :normalize_asset_timestamps - no need to touch (date modification) every assets | |
| # "deploy:web:disable" - traditional maintenance page (during DB migrations deployment) | |
| # task :restart - Unicorn with preload_app should be reloaded by USR2+QUIT signals, not HUP |
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
| # encoding: utf-8 | |
| require 'dropbox_sdk' | |
| class CarrierWave::Uploader::Base | |
| add_config :dropbox_app_key | |
| add_config :dropbox_app_secret | |
| add_config :dropbox_access_token | |
| add_config :dropbox_access_token_secret | |
| add_config :dropbox_user_id |
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
| http://www.instructables.com/id/Androino-Talk-with-an-Arduino-from-your-Android-d/?lang=pt |