Skip to content

Instantly share code, notes, and snippets.

@shivprasad
shivprasad / gist:4701503
Created Feb 3, 2013
Shell script to download trailers from http://hd-trailers.net. This script will download 480p trailers from Yahoo,Movifone and Apple. I started out from this script: http://majjix.com/2008/10/13/luke/automatically-downloading-quicktime-trailers-and-posters
View gist:4701503
#!/bin/bash
GETHD=1
GETPOSTER=1
KEEPDAYS="1365"
SAVEROOT="/media/Nexon/Trailers"
SAVEPATH="/media/Nexon/Trailers/hd-trailer."
DLDBPATH="/home/pi/"
FEEDS="http://feeds.hd-trailers.net/hd-trailers?format=xml"
@shivprasad
shivprasad / google.dictionary.user.js
Created Jul 18, 2011
A simple userscript which looks up selected word on google dictionary and alerts its meaning.
View google.dictionary.user.js
// ==UserScript==
// @name Google Dictionary
// @namespace http://byteco.de
// @include *
// ==/UserScript==
var t = '';
function gText(e) {
t = (document.all) ? document.selection.createRange().text : document.getSelection();
t = t.replace(/^\s+|\s+$/g,"");
View gist:163454
function nseQuotePuller(pblock,args){
var baseUrl = "http://www.nseindia.com/marketinfo/companyinfo/companysearch.jsp";
var params = {cons: Utils.trim(args.object.text),section:7};
jQuery.get( baseUrl, params, function( resp ) {
var begindex=resp.indexOf("/marketinfo/equities/cmquote_tab.jsp");
var searchresult=resp.indexOf("<font class=header3>Search Results</font>");
var noResult = resp.indexOf("<font class=contenttext>Click <a href=javascript:history.back()>here</a> to search again</font>");
if(begindex==-1 && searchresult==-1){
return;
}