Skip to content

Instantly share code, notes, and snippets.

View randallreedjr's full-sized avatar

Randall Reed, Jr. randallreedjr

View GitHub Profile
@randallreedjr
randallreedjr / 0_reuse_code.js
Created March 22, 2016 15:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
def index
urls = %w[http://cltampa.com/blogs/potlikker http://cltampa.com/blogs/artbreaker http://cltampa.com/blogs/politicalanimals http://cltampa.com/blogs/earbuds http://cltampa.com/blogs/dailyloaf http://cltampa.com/blogs/bedpost]
@final_images = []
@final_urls = []
urls.each do |url|
blog = Nokogiri::HTML(open(url))
images = blog.xpath('//*[@class="postBody"]/div[1]//img/@src')
images.each do |image|
@final_images << image