Skip to content

Instantly share code, notes, and snippets.

View caherrerapa's full-sized avatar

Carlos Andres Herrera caherrerapa

View GitHub Profile
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
#!/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
@caherrerapa
caherrerapa / 01. Gemfile
Created December 5, 2012 18:14 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth
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'
@caherrerapa
caherrerapa / bootstrap-plugins.txt
Created November 14, 2012 12:22 — forked from mklabs/bootstrap-plugins.txt
h5bp + twitter bootstrap integration
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