Skip to content

Instantly share code, notes, and snippets.

View enthooz's full-sized avatar

Andrew Ashbacher enthooz

  • Ventura, CA
  • 08:09 (UTC -07:00)
View GitHub Profile
function FindProxyForURL(url, host) {
// Roku corp domains
if (dnsDomainIs(host, ".roku.com") || dnsDomainIs(host, ".rokulabs.net")) {
return "SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080";
}
// Private subnets
if (isInNet(host, "10.0.0.0", "255.0.0.0") ||
isInNet(host, "172.16.0.0", "255.240.0.0") ||
isInNet(host, "192.168.0.0", "255.255.0.0"))
@enthooz
enthooz / http_get_stream.rb
Created March 29, 2012 21:07
Attempt at piping HTTP GET to HTTP PUT for direct to S3 transfer
require 'httparty'
require 'em-http-request'
class HttpGetStream
def initialize(http_url, listener = nil)
@http_url = http_url
@buffer = ''
self.listener = listener
end
@enthooz
enthooz / .cdrc
Created September 7, 2011 18:34
Automatically Change Heroku Accounts for Different Projects
heroku accounts:set ACCOUNT_NAME