I hereby claim:
- I am caherrerapa on github.
- I am caherrerapa (https://keybase.io/caherrerapa) on keybase.
- I have a public key ASDEOBSpIGJDP0v1Thurf7HaJZHHI2jqAXEdYtSE4NT5igo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
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) |
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]; |
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 |
/*************************************************** | |
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 |
#!/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 |
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' |
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', |