This file contains 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
# | |
# Recurring Job using Delayed::Job | |
# | |
# Setup Your job the "plain-old" DJ (perform) way, include this module | |
# and Your handler will re-schedule itself every time it succeeds. | |
# | |
# Sample : | |
# | |
# class MyJob | |
# include Delayed::ScheduledJob |
This file contains 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 |
This file contains 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 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 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
var test = window.open(null,"","width=1,height=1"); | |
setTimeout(function(){ | |
if (test && test.innerHeight && test.innerHeight > 0) { | |
// POPUP BLOCKER DISABLED | |
test.close(); | |
} | |
}, 10); |
This file contains 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 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 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 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 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, |
OlderNewer