Skip to content

Instantly share code, notes, and snippets.

View Mackaber's full-sized avatar
🚂
I like trains

Mackaber (Miguel Bravo) Mackaber

🚂
I like trains
View GitHub Profile
@Mackaber
Mackaber / gist:61fe339d3da5dc02e669
Created August 15, 2014 15:40
Http bot example
# Gets the first 10 results of the query without using google API
# And then prints them as a JSON
# Usage google.rb [your search]
require "net/https"
require "uri"
require "nokogiri"
require "json"
q = URI::encode(ARGV[0])
@Mackaber
Mackaber / axtellistgen.rb
Last active June 6, 2022 02:40
WPAlistgen
# For AXTEL-XXXX Routers (and probably others from ZHONE)
# By Mackaber
# USE $ruby axtellistgen.rb "XXXX"
def makelist(suffix)
keys = []
for i in 0..255 do
for j in 0..255 do
keys.push("#{i.to_s(16).upcase.rjust(2,"0")}#{j.to_s(16).upcase.rjust(2,"0")}#{suffix}")
end