This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'unirest' | |
puts "Please enter you city to find out the highs for the week" | |
city = gets.chomp.downcase | |
response = Unirest.get "https://george-vustrey-weather.p.mashape.com/api.php?location=#{city}", | |
headers:{'X-Mashape-Key'=> "17ECFHpjXjmshRDL0utKUrvKjcj6p1Yrg9TjsnJfGjy3okl7rq", 'Content-Type'=> "application/x-www-form-urlencoded"} | |
weather = response.body | |
weather.each {|x| | |
day_of_week = x["day_of_week"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
require 'nokogiri' | |
puts "Enter a stock ticker you would like to" | |
stock = gets.chomp.downcase | |
response = HTTParty.get("http://finance.yahoo.com/q?s=#{stock}") | |
dom = Nokogiri::HTML(response.body) | |
se = dom.xpath("//span[@id='yfs_l84_#{stock}']").first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="name.js"></script> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<form> |
OlderNewer