Skip to content

Instantly share code, notes, and snippets.

@bridgpal
bridgpal / statebird.rb
Last active December 17, 2015 14:09
Check for reservation on urbanspoon
require 'nokogiri'
require 'open-uri'
url = "http://rez.urbanspoon.com/reservation/start/2086"
while true
d = Nokogiri::HTML(open(url))
text = d.css("div p").first.text.gsub("this restaurant", "State Bird Provisions")

WDI Lab - April 8, 2013

Movies

You will be creating a movies app using Sinatra and the OMDB API.

Requirements

  • Ability to search for a movie by title
  • Ability to click on a search result to see detailed information about a movie including:
    • Title
  • Year
@bridgpal
bridgpal / geochart.html
Created December 31, 2012 17:47
Simple Google geochart example
<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {'packages': ['geochart']});
google.setOnLoadCallback(drawMarkersMap);
function drawMarkersMap() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Country');