This file contains 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
" Show syntax coloring | |
syntax enable | |
set tabstop=4 | |
set autoindent | |
set hls | |
colorscheme desert | |
" Show line numbers | |
" set number |
This file contains 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
#!/bin/bash | |
#Declare array | |
declare -a ARRAY | |
#Open file for reading to array | |
exec 10<urls.txt | |
let count=0 | |
while read LINE <&10; do | |
url=$LINE | |
hiturl="http://localhost:8000${LINE}" |
This file contains 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 simplejson | |
import urllib | |
import PyRSS2Gen | |
hn_url = "http://news.ycombinator.com/" | |
#Run the YQL and get the JSON back | |
yql_url = "http://query.yahooapis.com/v1/public/yql?q=%20select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fnews.ycombinator.com%2Fnewest%22%20and%20xpath%3D'%2F%2Ftd%5B%40class%3D%22title%22%5D%2Fa'&format=json&callback=" | |
yql_results = urllib.urlopen(yql_url) #The query will return JSON | |
yql_json = simplejson.load(yql_results) |
NewerOlder