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
bootstrap-tooltip.js | |
bootstrap-popover.js | |
bootstrap-alert.js | |
bootstrap-button.js | |
bootstrap-carousel.js | |
bootstrap-collapse.js | |
bootstrap-dropdown.js | |
bootstrap-modal.js | |
bootstrap-scrollspy.js | |
bootstrap-tab.js |
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
SampleApp::Application.configure do | |
... | |
require 'tlsmail' | |
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE) | |
ActionMailer::Base.delivery_method = :smtp | |
ActionMailer::Base.perform_deliveries = true | |
ActionMailer::Base.raise_delivery_errors = true | |
ActionMailer::Base.smtp_settings = { | |
:enable_starttls_auto => true, | |
:address => 'smtp.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
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |
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
#!/usr/bin/env ruby | |
require "openssl" | |
require 'digest/sha2' | |
require 'base64' | |
# We use the AES 256 bit cipher-block chaining symetric encryption | |
alg = "AES-256-CBC" | |
# We want a 256 bit key symetric key based on some passphrase | |
digest = Digest::SHA256.new |
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
/*************************************************** | |
Refactor of Titanium Cache, by Guilherme Chapiewski - http://guilherme.it | |
Modified by Carlos Herrera [email protected] to follow NodeJS syntax and possible to use in Appcelerator Titanium | |
This is a simple Cache implementation for Titanium that uses local SQLite | |
database to cache strings and JavaScript objects. | |
More info at http://github.com/guilhermechapiewski/titanium-cache#readme | |
https://gist.github.com/caherrerapa/6425618 |
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 'faraday' | |
require 'net/http/digest_auth' | |
module Faraday | |
# Public: A Faraday middleware to use digest authentication. Since order of | |
# middlewares do care, it should be the first one of the Request middlewares | |
# in order to work properly (due to how digest authentication works). | |
# | |
# If some requests using the connection don't need to use digest auth you |
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 openPaymentDialog(transactionId){ | |
console.log(transactionId); | |
var airtime_form_div = document.createElement('div'); | |
airtime_form_div.setAttribute('id', 'airtime_form'); | |
var mdn_input_url = 'https://sandbox.codapayments.com/airtime/begin?host_url=' + encodeURIComponent(window.location) + '&txn_id=' + transactionId + '&client_type=1&client_time=' + new Date().getTime(); | |
//var mdn_input_url = 'https://sandbox.codapayments.com/airtime/begin?host_url=https://www.zeemi.tv&txn_id=' + transactionId + '&client_type=1&client_time=' + new Date().getTime(); | |
airtime_form_div.innerHTML = '<div><iframe id=\"airtime_iframe\" src=\"' + mdn_input_url + '\" scrolling=\"no\"></iframe></div>'; | |
var body_el = document.getElementsByTagName("body")[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
require 'line/bot' | |
class CallbacksController < ApplicationController | |
def event_handler | |
signature = request.env['HTTP_X_LINE_CHANNELSIGNATURE'] | |
unless client.validate_signature(request.body.read, signature) | |
error 400 do 'Bad Request' end | |
end | |
receive_request = Line::Bot::Receive::Request.new(request.env) |
OlderNewer