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
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
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
var http = require('follow-redirects').http; | |
//top 1000 | |
var domains = ["google.com","facebook.com","youtube.com","yahoo.com","baidu.com","wikipedia.org","qq.com","linkedin.com","live.com","twitter.com","amazon.com","blogspot.com","taobao.com","google.co.in","sina.com.cn","wordpress.com","yahoo.co.jp","yandex.ru","bing.com","ebay.com","google.de","vk.com","hao123.com","163.com","tumblr.com","pinterest.com","google.co.uk","google.fr","googleusercontent.com","microsoft.com","msn.com","ask.com","mail.ru","google.co.jp","google.com.br","weibo.com","apple.com","paypal.com","google.ru","instagram.com","google.com.hk","xvideos.com","blogger.com","google.it","tmall.com","google.es","imdb.com","soso.com","craigslist.org","sohu.com","360.cn","go.com","amazon.co.jp","stackoverflow.com","bbc.co.uk","xhamster.com","google.com.mx","neobux.com","google.ca","fc2.com","cnn.com","imgur.com","alibaba.com","wordpress.org","flickr.com","espn.go.com","adcash.com","huffingtonpost.com","odnoklassniki.ru","t.co","conduit.com","thepira |
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
# I managed to get the compiled version with patched QT working on ubuntu precise 64bit (12.04 LTS) and thought I'd share my bash history in the hopes it might spare others some trouble shooting. | |
# Also note that this install process takes rather long, you might want to consider running it in a screen or something | |
# you will be needing git if you haven't got it yet | |
sudo apt-get install git-core | |
# as per installation instructions, install dependencies for wkhtmltopdf | |
sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev | |
# clone the repo | |
git clone git://github.com/antialize/wkhtmltopdf.git wkhtmltopdf |
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 | |
# Converts an image in a multi-resolution favicon | |
# Requires Imagemagick | |
function generate_favicon() { | |
command -v convert >/dev/null 2>&1 || (echo "Imagemagick not here, install it" && return ) | |
case "$#" in | |
"0") | |
echo "Usage: $FUNCNAME input.png output.ico" |