Skip to content

Instantly share code, notes, and snippets.

@ABrambleNinja
ABrambleNinja / showdown_data.rb
Last active August 29, 2015 14:12
Interprets Antar's stats and allows for easy access of raw data for usage based metas
# Pokemon Showdown Data Interpreter
# Created by ABrambleNinja (smogon: Piccolo Daimao), released under MIT license
# <abrambleninja.mit-license.org>
#
# Find the most updated version of this code here:
# https://gist.github.com/ABrambleNinja/359e8811c0cd8885bb31
require 'pry'
require 'uri'
require 'net/http'
@ABrambleNinja
ABrambleNinja / open_uri.rb
Last active December 18, 2015 22:39 — forked from zaius/open_uri.rb
# Allow open-uri to follow unsafe redirects (i.e. https to http).
# Relevant issue:
# http://redmine.ruby-lang.org/issues/3719
# Source here:
# https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb
module OpenURI
class <<self
alias_method :open_uri_original, :open_uri
alias_method :redirectable_cautious?, :redirectable?