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
# Based on https://gist.github.com/1182136 | |
class BootstrapLinkRenderer < ::WillPaginate::ActionView::LinkRenderer | |
protected | |
def html_container(html) | |
tag :div, tag(:ul, html), container_attributes | |
end | |
def page_number(page) | |
tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page) |
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
# Author: Abhinay Omkar | |
# Youtube Downloader | |
import sys | |
from urllib import urlopen, unquote | |
from urlparse import parse_qs, urlparse | |
youtube_watchurl = sys.argv[1] | |
url_query = urlparse(youtube_watchurl).query | |
video_id = parse_qs(url_query)['v'][0] | |
url_data = urlopen('http://www.youtube.com/get_video_info?&video_id=' + video_id).read() |