Monday, August 25, 2008

Configuring your ubuntu for faster internet access

While there is a lot already written here my quick howto


$ sudo bash
# apt-get install dnsmasq squid
# echo "listen-address=127.0.0.1" >> /etc/dnsmasq.conf
# echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
# vi /etc/dhcp3/dhclient.conf
# # ^ uncomment line #prepend domain-name-servers 127.0.0.1;
# vi /etc/resolv.conf # Add nameserver 127.0.0.1
# /etc/init.d/dnsmasq restart
# vi /etc/squid/squid.conf

http_port 3128
visible_hostname localhost

acl all src 0.0.0.0/0.0.0.0

cache_effective_user proxy
cache_effective_group proxy

http_access allow all
icp_access allow all

positive_dns_ttl 1 month
negative_dns_ttl 1 minute
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

cache_dir ufs /cache 400 16 256
cache_store_log none


# mkdir /cache # I have this dir on reizerfs partition
# chown proxy.proxy /cache

# /etc/init.d/squid restart


Configure your browser to use 127.0.0.1:8080.
Also read detailed dnsmasq setup article http://ubuntu.wordpress.com/2006/08/02/local-dns-cache-for-faster-browsing/

Friday, August 1, 2008

Youtube flash videos to DivX (on Linux)

This how I convert flash
I usually use Firefox VideoHelper Addon to download youtube videos. To play them on my Philips DVP5986K DVD player from USB drive, I need to convert it to DivX.

mencoder /home/shon/Desktop/file-864260998.flv -ovc lavc -oac mp3lame -ffourcc DX50 -o out.avi