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
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/04_install_phantomjs": | |
mode: "000777" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
set -xe |
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 String | |
def to_bool | |
return true if self == true || self =~ (/(true|t|yes|y|1)$/i) | |
return false if self == false || self.blank? || self =~ (/(false|f|no|n|0)$/i) | |
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"") | |
end | |
end |
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
<a onclick='return load_more_faqs();'> Load more FAQs</a> | |
function load_more_faqs { | |
$.ajax({url:'more_faqs', | |
success:function(data) { $('#faqs').append(data);} | |
}); | |
} |
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
# Sample localization file for English. Add more files in this directory for other locales. | |
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. | |
ru: | |
activerecord: | |
errors: | |
models: | |
subscription: | |
attributes: | |
email: |
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 Api::Foobar | |
include HTTParty | |
base_uri 'http://demo.foobar.es/vweb/xml' | |
GLOBAL_OPTIONS = {edad: 'anciano', farmacovigilancia: false, deportista: false, administrativas: false} | |
def initialize(user) | |
@user = user | |
end |
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
def assign_variable | |
@Four_Season_Set_Channel = params[:channel] | |
respond_to do |format| | |
format.js { | |
render(:update) { |page| page.alert @Four_Season_Set_Channel } | |
} | |
end | |
end |
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 'windows8_system' | |
require 'fetch_windows8_access_token' | |
require 'net/http' | |
require 'net/https' | |
class Windows8Notification < Windows8System | |
def self.process(device_uri,message) | |
puts "iha" | |
device_uri = "https://db3.notify.windows.com/?token=AgUAAAADoGlaM0THo74Q%2bJP7MkgBEJzYC7OyTwh59QmECe9MgwfwGSWLsMhkG%2bHF3JI3q3gySjc3keErqcwWYCN9Qwi2z7TdCMnYGb30huMkKrzB54%2fH73vxrYzp36SQScHazJA%3d" |
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 'httparty' | |
class ItunesVerification | |
include HTTParty | |
base_uri 'https://sandbox.itunes.apple.com' | |
default_params :output => 'json' | |
format :json | |
def self.verify_apple_receipt(apple_receipt) | |
post('/verifyReceipt', :body=>{'receipt-data' => apple_receipt}) |
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
if Object.const_defined?(:Iconv) | |
PermalinkFu.translation_to = 'ascii//translit//IGNORE' | |
PermalinkFu.translation_from = 'utf-8' | |
end |
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
if Object.const_defined?(:Iconv) | |
PermalinkFu.translation_to = 'ASCII//IGNORE//TRANSLIT' | |
PermalinkFu.translation_from = 'UTF-8' | |
end |
NewerOlder