Skip to content

Instantly share code, notes, and snippets.

View blizzarddreams's full-sized avatar
❄️
arctic fox

Blizzard blizzarddreams

❄️
arctic fox
  • Kentucky
  • 08:05 (UTC -05:00)
View GitHub Profile
{
"bulbasaur": {
"num": 1,
"species": "Bulbasaur",
"types": [
"Grass",
"Poison"
],
"genderRatio": {
"M": 0.875,
{
"absorb": {
"num": 71,
"accuracy": 100,
"basePower": 20,
"category": "Special",
"desc": "Deals damage to one adjacent target. The user recovers half of the HP lost by the target, rounded up. If Big Root is held by the user, the HP recovered is 1.3x normal, rounded half down.",
"shortDesc": "User recovers 50% of the damage dealt.",
"id": "absorb",
"name": "Absorb",
{
"normal": {
"weak_against": ["fighting"],
"resistant_against": [],
"immune_against": ["ghost"],
"super_effective_against": []
},
"fire": {
"weak_against": ["rock", "ground", "water"],
"resistant_against": ["steel", "fairy", "ice", "steel", "fire"],
package main
import (
"strings"
"os/exec"
)
func main() {
URL = "http://dl.bintray.com/oneclick/rubyinstaller/"
RUBY_VERSIONS_AVAILABLE = open(URL).read.scan(/>(.+)<\/a>/) # TODO: make this better.
.flatten
.delete_if { |r| r =~ /(md5|64|sha256|exe|doc|defunct\/)/ }
.map { |r| r[/>(.+)/].gsub(/>|ruby-/, "").gsub(/(-i386-(.+).7z)/, "") }
.uniq
.group_by { |x| x.split('-')[0] }
.tap { |x| x.map { |key, value| x[key] = x[key].map { |y| y.split('-')[1] }.join('|') } }
.map { |x, y| !y.empty? ? "#{x}-[#{y}]" : x }
URL = "http://dl.bintray.com/oneclick/rubyinstaller/"
RUBY_VERSIONS_AVAILABLE = open(URL).read.scan(/>(.+)<\/a>/) # TODO: make this better.
.flatten
.delete_if { |r| r =~ /(md5|64|sha256|exe|doc|defunct\/)/ }
.map { |r| r[/>(.+)/].gsub(/>|ruby-/, "").gsub(/(-i386-(.+).7z)/, "") }
.uniq
.group_by { |x| x.split('-')[0] }
.tap { |x| x.map { |key, value| x[key] = x[key].map { |y| y.split('-')[1] }.join('|') } }
.map { |x, y| !y.empty? ? "#{x}[#{y}]" : x }
require "zlib"
require "open-uri"
url = "https://cache.ruby-lang.org/pub/ruby/ruby-2.1.2.zip"
file_name = "ruby.zip"
#File.open(file_name, "wb") { |file| file.write(open(url).read) }
z = Zlib::Inflate.inflate(File.open(file_name, "rb").read)
require "zlib"
require "open-uri"
url = "https://cache.ruby-lang.org/pub/ruby/ruby-2.1.2.zip"
file_name = "ruby.zip"
File.open(file_name, "wb") { |file| file.write(open(url).read) }
z = Zlib::GzipReader.open(file_name)
require 'zlib'
require 'open-uri'
file_name = "hello.tar.gz"
download_url = "https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.8.tar.gz"
File.open(file_name, "wb") do |f|
f.write(Zlib::GzipReader.new(open(download_url)).read)
end
require 'zlib'
require 'open-uri'
file_name = "hello.tar.gz"
download_url = "https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz"
File.open(file_name, "wb") do |f|
f.write(Zlib::GzipReader.new(open(download_url)).read)
end
end