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> | |
| <title>Page Title</title> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
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> | |
| <title>Page Title</title> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
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> | |
| <title>Page Title</title> | |
| </head> | |
| <body> | |
| <div></div> | |
| </body> | |
| </html> |
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
| import urllib2 | |
| from bs4 import BeautifulSoup | |
| m = 0 | |
| ph_home = BeautifulSoup(urllib2.urlopen('http://www.producthunt.com')) | |
| cache = [] | |
| for thread in ph_home.findAll('a', { 'class': 'view-discussion' }): | |
| thread_page = BeautifulSoup(urllib2.urlopen('http://producthunt.com' + thread['href'])) |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html> | |
| <head> | |
| <title>foursquare :: Explore Sample</title> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" id="jquery"></script> | |
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 lang="en-US"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Sample Foursquare Widget</title> | |
| </head> | |
| <body> | |
| <h1>Sample Foursquare Widget</h1> | |
| <!-- Place this anchor tag where you want the button to go --> | |
| <a href="https://foursquare.com/intent/venue.html" class="fourSq-widget" data-variant="wide" data-vid="412d2800f964a520df0c1fe3">Save to foursquare</a> |
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
| include Mongo | |
| mongo_uri = ENV['MONGOLAB_URI'] || 'mongodb://localhost:27017' | |
| mongo = MongoClient.from_uri(mongo_uri) | |
| db = mongo[mongo_uri[%r{/([^/\?]+)(\?|$)}, 1] || 'test'] | |
| get '/' do | |
| # mongodb usage -- see README for proper db setup | |
| logger.info(db['testCollection'].find({'foo' => 'meh'}).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
| var http = require('http'), | |
| https = require('https'); | |
| http.createServer(function (req, res) { | |
| res.writeHead(200, {'Content-Type': 'text/html'}); | |
| var options = { | |
| host: 'api.foursquare.com', | |
| path: '/v2/venues/explore?oauth_token=YOUR_OAUTH_TOKEN&near=10027&query=bars', | |
| method: 'GET', |