Skip to content

Instantly share code, notes, and snippets.

@zpinter
zpinter / gist:5995641
Last active December 19, 2015 17:59
tech.hulu.com - Tips and Highlights from Developing Mobile apps for Windows
public async Task<string> Nonce()
{
var res = await ExecuteSiteRequest(new NonceRequest());
return res.Value;
}
public async Task<SiteUser> Login(string username, string password)
{
var req = new AuthenticateRequest(username, password, await Nonce());
var res = await ExecuteSiteRequest(req);
require "openssl"
require "net/smtp"
Net::SMTP.class_eval do
private
def do_start(helodomain, user, secret, authtype)
raise IOError, 'SMTP session already started' if @started
check_auth_args user, secret, authtype if user or secret
sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
require "openssl"
require "net/smtp"
Net::SMTP.class_eval do
private
def do_start(helodomain, user, secret, authtype)
raise IOError, 'SMTP session already started' if @started
check_auth_args user, secret, authtype if user or secret
sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }
# Be sure to restart your server when you modify this file
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.0.1' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration