A Blog about technology, linux, peer2peer, cool new downloads and software development.

Thursday, December 24, 2009

how to install ndis atheros wifi driver on lenovo T60 ubuntu


download the windows xp driver from : http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-70480

install with the 1st stage with wine to extract the driver files

copy the extracted driver from : ~/.wine/drive_c/DRIVERS/WIN/WLLANATH/WinXP_2K
to ~/lenovo

isntall :
sudo apt-get install ndisgtk

disable the ath9k driver :
sudo modprobe -vr ath9k

activate the ndis driver :
Go to System>Administration>Windows Wirless Drivers, (NDISWRAPPER will open now, (after password is given)).
Choose Install Driver.
Goto location line, click on the right folder tab and browse to:
~/lenovo/WLLANATH/WinXP_2K
Choose to install.

to stop ath9k loading at boot
sudo vim /etc/modprobe.d/blacklist.conf
blacklist ath9k

reboot

reference :
http://ubuntuforums.org/showthread.php?t=739998

Sunday, December 20, 2009

how to configure ubuntu linux to manage amazon ec2 machine


start an instance @
https://console.aws.amazon.com/ec2/home

download : ec2-api-tools @
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351
unzip to $HOME/bin/ec2-api-tools-1.3-46266

add to .bashrc :
# EC2 - begin
export EC2_PRIVATE_KEY=$HOME/keys/pk-KWJIYEWJXT7MOMSS2OHMIS7IYLHAGTN7.pem
export EC2_CERT=$HOME/keys/cert-KWJIYEWJXT7MOMSS2OHMIS7IYLHAGTN7.pem
export EC2_HOME=$HOME/bin/ec2-api-tools-1.3-46266
export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre/
# EC2 - end

run :
. .bashrc

test :
./bin/ec2-api-tools-1.3-46266/bin/ec2-describe-instances

docs :
http://docs
.amazonwebservices.com/AWSEC2/latest/CommandLineReference/

https://help.ubuntu.com/community/EC2StartersGuide

Friday, December 18, 2009

how to enable syntax highlight imacros iim scripts in gedit on ubuntu linux


download imacros.lang from http://albertux.ayalasoft.com/tag/imacros/

sudo cp imacros.lang /usr/share/gtksourceview-2.0/language-specs/
sudo chmod a+r /usr/share/gtksourceview-2.0/language-specs/imacros.lang

restart gedit

Wednesday, December 16, 2009

how to configure fixed ip on ubuntu linux


sudo vim /etc/network/interfaces
[ CHANGE : ]
# The primary network interface
auto eth0
iface eth0 inet dhcp

[ TO : ]
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.8
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 8.8.8.8

Tuesday, December 15, 2009

how to find & fix badblocks on ext3 partittion


readonly test :
sudo e2fsck -c -C 0 -y -vv /dev/sdi1

read-write test :
sudo e2fsck -cc -C 0 -y -vv /dev/sdi1

Friday, December 11, 2009

how to install eclipse with sftp on ubuntu linux


option 1: Aptana Studio
http://www.aptana.org/

option 2: Eclipse Pulse
http://www.poweredbypulse.com/

option 3: how to install sftp on any eclipse
help->install new
[wait for the catalog to update
select : -- Alla Avaliable Sites --
search : target managment


help->install new
[wait for the catalog to update
select : -- Alla Avaliable Sites --
search : remote system


how to find all unread email in gmail inbox


search :
label:inbox is:unread

create rule to mark all as read, apply, delete rule

Tuesday, December 8, 2009

how to configure polipo proxy on ubuntu linux


sudo apt-get install polipo

sudo vim /etc/polipo/config
================================= public : 8< =======================================
# Sample configuration file for Polipo. -*-sh-*-

# You should not need to edit this configuration file; all configuration
# variables have reasonable defaults.

# This file only contains some of the configuration variables; see the
# list given by ``polipo -v'' and the manual for more.


### Basic configuration
### *******************

# Uncomment one of these if you want to allow remote clients to
# connect:

# proxyAddress = "::0" # both IPv4 and IPv6
proxyAddress = "0.0.0.0" # IPv4 only

# If you are enabling 'proxyAddress' above, then you want to enable the
# 'allowedClients' variable to the address of your network, e.g.
allowedClients = 127.0.0.1, 192.168.0.0/24

# allowedClients = 127.0.0.1

# Uncomment this if you want your Polipo to identify itself by
# something else than the host name:

# proxyName = "polipo.example.org"

# Uncomment this if there's only one user using this instance of Polipo:

# cacheIsShared = false

# Uncomment this if you want to use a parent proxy:

# parentProxy = "squid.example.org:3128"

# Uncomment this if you want to use a parent SOCKS proxy:

# socksParentProxy = "localhost:9050"
# socksProxyType = socks5


### Memory
### ******

# Uncomment this if you want Polipo to use a ridiculously small amount
# of memory (a hundred C-64 worth or so):

# chunkHighMark = 819200
# objectHighMark = 128

# Uncomment this if you've got plenty of memory:

# chunkHighMark = 50331648
# objectHighMark = 16384


### On-disk data
### ************

# Uncomment this if you want to disable the on-disk cache:

# diskCacheRoot = ""

# Uncomment this if you want to put the on-disk cache in a
# non-standard location:

# diskCacheRoot = "~/.polipo-cache/"

# Uncomment this if you want to disable the local web server:

# localDocumentRoot = ""

# Uncomment this if you want to enable the pages under /polipo/index?
# and /polipo/servers?. This is a serious privacy leak if your proxy
# is shared.

disableIndexing = false
disableServersList = false


### Domain Name System
### ******************

# Uncomment this if you want to contact IPv4 hosts only (and make DNS
# queries somewhat faster):

# dnsQueryIPv6 = no

# Uncomment this if you want Polipo to prefer IPv4 to IPv6 for
# double-stack hosts:

# dnsQueryIPv6 = reluctantly

# Uncomment this to disable Polipo's DNS resolver and use the system's
# default resolver instead. If you do that, Polipo will freeze during
# every DNS query:

# dnsUseGethostbyname = yes


### HTTP
### ****

# Uncomment this if you want to enable detection of proxy loops.
# This will cause your hostname (or whatever you put into proxyName
# above) to be included in every request:

# disableVia=false

# Uncomment this if you want to slightly reduce the amount of
# information that you leak about yourself:

# censoredHeaders = from, accept-language
# censorReferer = maybe

# Uncomment this if you're paranoid. This will break a lot of sites,
# though:

# censoredHeaders = set-cookie, cookie, cookie2, from, accept-language
# censorReferer = true

# Uncomment this if you want to use Poor Man's Multiplexing; increase
# the sizes if you're on a fast line. They should each amount to a few
# seconds' worth of transfer; if pmmSize is small, you'll want
# pmmFirstSize to be larger.

# Note that PMM is somewhat unreliable.

pmmFirstSize = 16384
pmmSize = 8192

# Uncomment this if your user-agent does something reasonable with
# Warning headers (most don't):

# relaxTransparency = maybe

# Uncomment this if you never want to revalidate instances for which
# data is available (this is not a good idea):

# relaxTransparency = yes

# Uncomment this if you have no network:

# proxyOffline = yes

# Uncomment this if you want to avoid revalidating instances with a
# Vary header (this is not a good idea):

# mindlesslyCacheVary = true

# Suggestions from Incognito configuration
maxConnectionAge = 5m
maxConnectionRequests = 120
serverMaxSlots = 8
serverSlots = 2
tunnelAllowedPorts = 1-65535
================================= 8< =======================================
or
============= private via ssh socks tunnel : 8< ============================
### Basic configuration
### *******************

# Uncomment one of these if you want to allow remote clients to
# connect:

# proxyAddress = "::0" # both IPv4 and IPv6
# proxyAddress = "0.0.0.0" # IPv4 only

proxyAddress = "127.0.0.1"
proxyPort = 8118

# If you do that, you'll want to restrict the set of hosts allowed to
# connect:

# allowedClients = "127.0.0.1, 134.157.168.57"
# allowedClients = "127.0.0.1, 134.157.168.0/24"

allowedClients = 127.0.0.1
allowedPorts = 1-65535

# Uncomment this if you want your Polipo to identify itself by
# something else than the host name:

proxyName = "localhost"

# Uncomment this if there's only one user using this instance of Polipo:

cacheIsShared = false

# Uncomment this if you want to use a parent proxy:

# parentProxy = "squid.example.org:3128"

# Uncomment this if you want to use a parent SOCKS proxy:

socksParentProxy = "localhost:8081"
socksProxyType = socks5


### Memory
### ******

# Uncomment this if you want Polipo to use a ridiculously small amount
# of memory (a hundred C-64 worth or so):

# chunkHighMark = 819200
# objectHighMark = 128

# Uncomment this if you've got plenty of memory:

# chunkHighMark = 50331648
# objectHighMark = 16384

chunkHighMark = 33554432

### On-disk data
### ************

# Uncomment this if you want to disable the on-disk cache:

#diskCacheRoot = ""

# Uncomment this if you want to put the on-disk cache in a
# non-standard location:

# diskCacheRoot = "~/.polipo-cache/"

# Uncomment this if you want to disable the local web server:

#localDocumentRoot = ""

# Uncomment this if you want to enable the pages under /polipo/index?
# and /polipo/servers?. This is a serious privacy leak if your proxy
# is shared.

disableIndexing = false
disableServersList = false

disableLocalInterface = false
disableConfiguration = false

### Domain Name System
### ******************

# Uncomment this if you want to contact IPv4 hosts only (and make DNS
# queries somewhat faster):
#
# dnsQueryIPv6 = no

# Uncomment this if you want Polipo to prefer IPv4 to IPv6 for
# double-stack hosts:
#
# dnsQueryIPv6 = reluctantly

# Uncomment this to disable Polipo's DNS resolver and use the system's
# default resolver instead. If you do that, Polipo will freeze during
# every DNS query:

dnsUseGethostbyname = yes


### HTTP
### ****

# Uncomment this if you want to enable detection of proxy loops.
# This will cause your hostname (or whatever you put into proxyName
# above) to be included in every request:

disableVia = true

# Uncomment this if you want to slightly reduce the amount of
# information that you leak about yourself:

# censoredHeaders = from, accept-language
# censorReferer = maybe

censoredHeaders = from,accept-language,x-pad,link
censorReferer = maybe

# Uncomment this if you're paranoid. This will break a lot of sites,
# though:

# censoredHeaders = set-cookie, cookie, cookie2, from, accept-language
# censorReferer = true

# Uncomment this if you want to use Poor Man's Multiplexing; increase
# the sizes if you're on a fast line. They should each amount to a few
# seconds' worth of transfer; if pmmSize is small, you'll want
# pmmFirstSize to be larger.

# Note that PMM is somewhat unreliable.

pmmFirstSize = 16384
pmmSize = 8192

# Uncomment this if your user-agent does something reasonable with
# Warning headers (most don't):

# relaxTransparency = maybe

# Uncomment this if you never want to revalidate instances for which
# data is available (this is not a good idea):

# relaxTransparency = yes

# Uncomment this if you have no network:

# proxyOffline = yes

# Uncomment this if you want to avoid revalidating instances with a
# Vary header (this is not a good idea):

# mindlesslyCacheVary = true

# Suggestions from Incognito configuration
maxConnectionAge = 5m
maxConnectionRequests = 120
serverMaxSlots = 8
serverSlots = 2
tunnelAllowedPorts = 1-65535
================================= 8< =======================================
sudo /etc/init.d/polipo restart

Sunday, November 29, 2009

ubuntu linux - utils for perfect desktop install

http://www.howtoforge.org/the-perfect-desktop-kubuntu-9.10
http://www.howtoforge.org/installing-apache2-with-php5-and-mysql-support-on-ubuntu-9.10-lamp


sudo apt-get install krusader
sudo apt-get install gnome-commander

sudo apt-get install gnome-do or [// awn]
sudo apt-get install rxvt
sudo apt-get install yakuake
sudo apt-get install byobu
sudo apt-get install glipper
sudo apt-get install rcconf
sudo apt-get install mc
sudo apt-get install alltray
sudo apt-get install locate
sudo apt-get install catfish
http://desktop.google.com/linux/

sudo apt-get install konsole kate konqueror krdc

http://www.chromium.org/getting-involved/dev-channel
http://www.google.com/chrome?platform=linux&hl=en
sudo apt-get install midori arora
http://getswiftfox.com/index.htm
http://swiftweasel.tuxfamily.org/
http://www.opera.com/
http://www.seamonkey-project.org/
http://flock.com/
http://browser.netscape.com/

akragator
amaya
amule
httrack
bluefish
kompare
scite

sudo apt-get install vim-gnome vim-nox cream
sudo apt-get install jedit
http://netbeans.org/
http://www.eclipse.org/
http://www.activestate.com/komodo_edit/
kompozer

adobe air & flash


blender
dia
dngconverter
gimp
gthumb
gwenview
hugin
krita
okular
scribus
pdfedit
xpdf
xsane
ktorrent
filezilla
putty
wireshark
zenmap
transmittion

dropbox
skype
freenx & qtnx
virtualbox
tweetdeck
http://www.keepassx.org/
bibble

audacity
avidemux
dvd95 converter
dvd::rip
handbreak
k3b
mplayer
smplayer
vlc
qisoburn
xine
xvidcap screen capture
vuze

gkrellm
xosview
htop

envyng


http://wakoopa.com/account/download

https://launchpad.net/terminator

Quick Drop-Down Terminal With Yakuake

Quick Drop-Down Terminal With Yakuake

sudo apt-get install yakuake

http://lifehacker.com/309652/quick-drop+down-terminal-with-yakuake

Saturday, November 28, 2009

how to convert video to flv & wmv with ffmpeg on ubunu linux


ffmpeg -i file.mpeg -f flv -b 1200kb file.flv
ffmpeg -i file.mpeg -vcodec wmv2 -b 1200kb file.wmv

Wednesday, November 25, 2009

Tuesday, November 24, 2009

how to add/remove www. from domain name in .htaccess


to add/remove www. with mod rewrite :
cd public_html
vim .htaccess

# remove www
RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]


# insert www
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Tuesday, November 17, 2009

how to download youtube videos in ubuntu linux

sudo apt-get install youtube-dl
youtube-dl -b "link to youtube video"

[or: youtube-dl -b -l "link to youtube video"]
[or: youtube-dl -b -t "link to youtube video"]

Alternative :
get-flash-videos -
code.google.com/p/get-flash-videos/  //  http://www.ubuntugeek.com/get-flash-videos-a-command-line-program-to-download-flash-videos.html

Saturday, November 14, 2009

how to accelerate firefox performance


http://about:config

http.max*
Set network.http.max-connections to 96
Set network.http.max-connections-per-server to 32
Set network.http.max-persistent-connections-per-server to 8

pipelining*
Set network.http.pipelining to true
Set network.http.proxy.pipelining to true
Set network.http.pipelining.ssl to true
Set network.http.pipelining.maxrequests to 8

browser.tabs.tabMinWidth = 25

Friday, November 13, 2009

how to overcome "argument list too long" error o tar and other commands


find . -name "*.txt" -print | tar -zcvf BAK/0001.tgz --files-from -

Thursday, November 12, 2009

how to configure samba & squid with wizards in ubuntu linux


sudo apt-get install gadmin-tools

How to configure ubuntu linux terminal to fast scrolling : aterm & wterm


sudo apt-get install aterm
aterm -fg yellow -bg black -geometry 128x50 -fn "8x13" -si -sr -sk -sl 4000
time seq -f 'teeeeeeeeeeeeeeeeeeeeeeeeeeeeeest %g' 1000000

sudo apt-get install wterm
wterm -fg yellow -bg black -geometry 128x50 -fn "8x13" -si -sr -sk -sl 4000
time seq -f 'teeeeeeeeeeeeeeeeeeeeeeeeeeeeeest %g' 1000000

Friday, October 30, 2009

ubuntu package management with dpkg


# dpkg --list
# dpkg --info packageName
# apt-get remove packageName

Thursday, October 22, 2009

how to view swf video on ubuntu linux


sudo apt-get install gnash
gnash 123.swf

Monday, October 12, 2009

rxvt configuration


rxvt -fg yellow -bg black -geometry 128x50 -fn "8x13" -j -si -sw -sr -sk -bc -sl 4000

Saturday, October 10, 2009

how to install latest version of transmission bit torrent client on ubuntu linux


following instructions from : http://forum.transmissionbt.com/viewtopic.php?f=13&t=5604

for 9.04 / jaunty :

sudo gpg --keyserver keyserver.ubuntu.com --recv 976b5901365c5ca1
sudo gpg --export --armor 976b5901365c5ca1 | sudo apt-key add -

sudo vim /etc/apt/sources.list
# add the lines
deb http://ppa.launchpad.net/transmissionbt/ubuntu jaunty main
deb-src http://ppa.launchpad.net/transmissionbt/ubuntu jaunty main
:wq

sudo apt-get install transmission
OR
sudo apt-get update
sudo apt-get upgrade

Friday, October 9, 2009

how to convert web page to pdf in ubuntu


sudo aptitude install htmldoc
htmldoc

edit pdfs :
sudo apt-get install pdfedit

print to pdf :
sudo apt-get install cups-pdf

save web page to pdf :
https://addons.mozilla.org/en-US/firefox/addon/636

Wednesday, September 30, 2009

how to search for missing libraries in ubuntu linux


sudo apt-get install apt-file
apt-file update
apt-file search Xtst
sudo apt-get install libxtst6 libxtst-dev

Saturday, September 26, 2009

how to - download accelerator on ubuntu linux

sudo apt-get install lftp

lftp
pget -c http://ppc.a.ec.viddler.com/.../b3a4f73071a038d931.flv &
jobs


Alternative :
sudo apt-get install axel

axel -a -v -o "name.flv"  http://ppc.a.ec.viddler.com/.../b3a4f73071a038d931.flv

Monday, September 21, 2009

ubuntu linux - how to watermark a video from cli


# Download video from youtube :
sudo apt-get install youtube-dl
youtube-dl -b -l "link to youtube video"
[or: youtube-dl -b -t "link to youtube video"]

sudo apt-get isntall ffmpeg

ffmmpeg -i in.flv out.avi
--------------------------
sudo apt-get install avidemux avidemux2_cli

# prepare the logo
cat > logo.avidemux_filters
<?xml version="1.0"?>
<filters FilterNumber="1">
<Filter Tag="79" Conf="Logo at 0 0, alpha 194067208">
<Parameters Number="4">
<image>/tmp/dollar-small.png</image>
<x>0</x>
<y>0</y>
<alpha>255</alpha>
</Parameters>
</Filter>
</filters>
<ctrl>-d

avidemux2_cli --load "41wL9Nko4aI.flv" --audio-codec MP3 --video-codec XVID4 --filters "logo.avidemux_filters" --output-format AVI --save "myvideo01avi" --quit

Saturday, September 19, 2009

hd led replacement on ubuntu linux


in synaptic find and install :
gkrellm
gkhdplop

Saturday, September 12, 2009

how to update atheros ath9k.ko driver to the latest on ubuntu linux


Download the latest compat-wireless-2.6.tar.bz2 from :
http://linuxwireless.org/en/users/Download
open it and :

find . -name "*" -exec touch {} \;
make
sudo -s
make install

modinfo ath9k
filename: /lib/modules/2.6.28-15-generic/kernel/drivers/net/wireless/ath9k/ath9k.ko
...
mv /lib/modules/2.6.28-15-generic/kernel/drivers/net/wireless/ath9k/ath9k.ko /lib/modules/2.6.28-15-generic/kernel/drivers/net/wireless/ath9k/ath9k.ko.bak

make unload

cat > ~/wifi_reset.sh
#!/bin/bash -x
sudo modprobe -vr ath9k
sudo modprobe -vr ath5k
sleep 1
sudo modprobe -v ath9k
#sudo modprobe -v ath9k btcoex_enable=1
#sudo modprobe -v ath5k
sudo iwconfig wlan0 power off

#sudo iwconfig wlan0 rate 48M auto
#sudo iwconfig wlan0 txpower off
#sudo iwconfig wlan0 txpower auto
#sudo iwconfig wlan0 txpower 20dBm
sudo iwconfig wlan0 txpower 19dBm
<ctrl>-d

chmod +x ./wifi_reset.sh
./wifi_reset.sh

Monday, August 31, 2009

how to enable & disable emerald on ubuntu linux


In CCSM search for "window decorations" -> change the "command" to :
enable emerald : /usr/bin/emerald
disable emerald : /usr/bin/compiz-decorator

Monday, August 24, 2009

how to edit animated gifs on ubuntu with gifsicle to reduce size


mkdir 66213
cd 66213
gifsicle --explode ../66213.gif
# delete the frames that that dont hurt the animation
gifsicle -O2 --colors 64 --dither --delay=100 --loop *.gif* > ../66213-o.gif
# or
gifsicle --optimize --colors 170 --delay=100 --loop *.gif* > ../66213-o.gif

view animated gifs in ubuntu


sudo aptitude install gthumb

asssocuate gif files with gthumb

Sunday, August 23, 2009

how to install hdaps on ubuntu / lenovo t60


sudo apt-get install build-essential module-assistant
sudo /etc/init.d/hdapsd stop
sudo modprobe -vr hdaps
sudo modprobe -vr tp-smapi
sudo m-a a-i -f tp-smapi
sudo -i
rm /lib/modules/$KVER/kernel/ubuntu/misc/thinkpad_ec.ko
rm /lib/modules/$KVER/kernel/ubuntu/misc/tp_smapi.ko
rm /lib/modules/$KVER/kernel/drivers/hwmon/hdaps.ko
modprobe tp_smapi
modprobe hdaps
# install hdapsd from : https://launchpad.net/~jonasped/+archive/ppa
/etc/init.d/hdapsd start
hdaps-gl

# refrence :
# https://launchpad.net/~jonasped/+archive/ppa
# http://meandmyubuntu.blogspot.com/2009/05/getting-hdasp-to-work-on-jaunty.html
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/297213/comments/15

Saturday, August 15, 2009

Burn XBox 360 & PS2 games on Ubuntu Linux


$ growisofs -use-the-force-luke=dao
-use-the-force-luke=break:1913760
-dvd-compat -speed=2
-Z /dev/scd0=xboxgame.iso

Notes :
/dev/scd0 is the dvd-rw device name -
find it with cat /etc/fstab or dmesg

Note 2 :
to burn mdf/mds files use :
sudo apt-get install mdf2iso

Friday, August 7, 2009

rsync how-to tutorial

Update :
rsync -azCPvv src user:xxx.xxx.xxx.xxx:/tmp/
Note : no / after src (not src/)

Based upon :
http://www.cyberciti.biz/tips/linux-use-rsync-transfer-mirror-files-directories.html

Example :
rsync -vvrhzP -e ssh ./dir user@192.168.0.5:Downloads
^ NO trailing /
Will copy local files to remote machine & recreate ~/Downloads/dir on the remote machine

Example 2 : copy file/s with progress indicator instead of cp
rsync -vvrhP [src] [dest]

Tuesday, July 7, 2009

force reboot linux server


# this command is more powerfull than reboot -f
echo “b” > /proc/sysrq-trigger

Friday, July 3, 2009

How to fix transparent virtualbox window in ubuntu

If the virtual box window is transparent -

change the launcher shortcut command from : "VirtualBox" to :

"env XLIB_SKIP_ARGB_VISUALS=1 VirtualBox"

Thursday, July 2, 2009

how to install nvidia driver in ubuntu

envy : http://albertomilone.com/nvidia_scripts1.html


nvidia-settings

(if there is problem saving config then : rm /etc/X11/xorg.conf; nvidia-xconfig)

Sunday, June 21, 2009

ubuntu screen profiles how to


sudo apt-get install -y screen-profiles
sudo apt-get install -y screen-profiles-extras

# to configure run ;
$ screen-profiles

Saturday, June 20, 2009

apache mod_proxy how to


Links :
-------
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse
http://apache.webthing.com/mod_proxy_html/ --> http://www.apachetutor.org/admin/reverseproxies

Modules :
---------
yum install httpd-devel
yum install libxml2-devel

Configuration:
--------------
cp proxy_html.conf /etc/httpd/conf/
vim /etc/httpd/conf/httpd.conf

LoadFile /usr/lib/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so
Include conf/proxy_html.conf

(
Also Check :
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
)

Vhost :
-------
Example :

<VirtualHost 208.109.169.70:80>
ServerAdmin "webmaster@upframr.com"
ServerName upframr.com
ServerAlias www.upframr.com
MIMEMagicFile /dev/null
CustomLog logs/upframr.com_access_log "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
ErrorLog logs/upframr.com_error_log

DocumentRoot "/home/admin2/public_html"
<Directory "/home/admin2/public_html">
Options +Indexes +FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>

Alias /mod_perl "/home/admin2/public_html/mod_perl"
<Directory "/home/admin2/public_html/mod_perl">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</Directory>

<Location /perl-status>
SetHandler perl-script
PerlResponseHandler Apache::Status
Order deny,allow
Deny from all
Allow from upframr.com
</Location>

ScriptAlias /cgi-bin "/home/admin2/public_html/cgi-bin"

Alias /usage /var/www/stats/upframr.com
<Directory /var/www/stats/upframr.com>
Order allow,deny
Allow from all
</Directory>

<Location /usage>
Order allow,deny
Allow from all
</Location>
</VirtualHost>

Sunday, June 7, 2009

How to fix grub boot problem in ubuntu linux


sudo grub
find /boot/grub/stage1
(hd0,1)
root (hd0,1)
setup (hd0)
quit

Monday, May 25, 2009

ip takeover attack with hunt to arp spoof


$ sudo apt-get install hunt


$ sudo hunt
/*
* hunt 1.5
* multipurpose connection intruder / sniffer for Linux
* (c) 1998-2000 by kra
*/
starting hunt
--- Main Menu --- rcvpkt 0, free/alloc 63/64 ------
l/w/r) list/watch/reset connections
u) host up tests
a) arp/simple hijack (avoids ack storm if arp used)
s) simple hijack
d) daemons rst/arp/sniff/mac
o) options
x) exit
-> d
--- daemons --- rcvpkt 148, free/alloc 63/64 ------
r) reset daemon
a) arp spoof + arp relayer daemon
s) sniff daemon
m) mac discovery daemon
x) return
-dm> a
--- arpspoof daemon --- rcvpkt 250, free/alloc 63/64 ------
s/k) start/stop relayer daemon
l/L) list arp spoof database
a) add host to host arp spoof i/I) insert single/range arp spoof
d) delete host to host arp spoof r/R) remove single/range arp spoof
t/T) test if arp spoof successed y) relay database
x) return
-arps> i
host to spoof> 10.1.1.253 # DEFAULT GATEWAY IP ADDRESS
fake mac [EA:1A:DE:AD:BE:01]> # RANDOM MAC ADDR, DEFAULT OK
target - where to insert the spoof> 10.1.1.48 # IP OF HOST TO TAKE DOWN
refresh interval sec [0]> 1
ARP spoof of 10.1.1.253 with fake mac EA:1A:DE:AD:BE:01 in host 10.1.1.48 FAILED
do you want to force arp spoof until successed y/n [y]> y
CTRL-C to break
....^C

Friday, May 22, 2009

better cygwin terminal


install MinTTY is now available as Cygwin package, to be found under the 'Shells' category of setup.exe

edit the cygwin.bat :
replace :
bash --login -i
with :
start mintty -e bash --login -i

Saturday, May 16, 2009

how to install hellanzb on ubuntu linux with ipv6


$ sudo apt-get install hellanzb
$ sudo vim /etc/hellanzb.conf
#configure server like :
defineServer(id = 'newszilla6.xs4all.nl',
hosts = [ 'localhost:1191' ],
#hosts = [ 'news.changeme.com', 'morenews.changeme.com:8000' ],


username = None, # no auth
password = None,

connections = 4,
antiIdle = 4.5 * 60, # 4 minutes, 30 seconds, 0 to disable
#bindTo = '204.31.33.7', # connect FROM this ip address
#enabled = False, # disable this server
#skipGroupCmd = False, # skip sending nntp GROUP commands
#fillserver = 0, # defaults to 0 (a main server).
# fillservers must have values > 0
# (priority)
ssl = False
)
# if u want configure the download path :
Hellanzb.PREFIX_DIR = '/mnt/sdb1/'

> before running start the ipv6 tunnel :
$ 6tunnel 1191 newszilla6.xs4all.nl 119
# create the tunnel per instructions in previous post

> bonus install gui from : http://www.lottanzb.org/

Thursday, May 14, 2009

how to install nzbperl on ubuntu


sudo apt-get install libxml-dom-perl libterm-readkey-perl uudeview
sudo apt-get install libio-socket-inet6-perl
wget http://noisybox.net/computers/nzbperl/nzbperl.pl
wget http://noisybox.net/computers/nzbperl/nzbperlrc.sample

Monday, May 11, 2009

add scp support to eclipse (& remote editing)


Download the latest release of : Target Management project, RSE downloads
from : http://download.eclipse.org/dsdp/tm/downloads/index.php
stop eclipse
and unzip into the eclipse directory.
start eclipse
goto Window->Show view->type "Remote Systems"
{right click} New -> Connection

Thursday, May 7, 2009

how to download nzb free with ubuntu linux ipv6


Download Sabnzbd, I currently use a premade deb from http://www.mbastiaan.nl/sabnzbd.php

install with :
sudo dpkg -i sanzb...

run as application :
sabnzbd -b 0 -s 0.0.0.0:8080
run as daemon :
sabnzbd -b 0 -s 0.0.0.0:8080 -d

Add news servers :
News Host Size Retention Connections Speed
-----------------------------------------------------------
news.ipv6.eweka.nl 400+Tb 120 days 4 20mbit/s
newszilla6.xs4all.nl 40+Tb 18 days 3 150kb/s
reader.ipv6.xsnews.nl 107 days 10 20mbit/s
signup at IPv6 Test

Get more servers @ http://www.ubuntu-unleashed.com/2009/03/howto-easily-get-free-newsgroup-access.html

Wednesday, May 6, 2009

How to setup tspc ipv6-ipv4 tunnel thru NAT on ubuntu linux


sudo apt-get install tspc
sudo vim /etc/tsp/tspc.conf

#Find the userid line and enter your useid for freenet6, then find the passwd line and enter your #password you set, then set the server as broker.freenet6.net
#Like this:
userid=your-name
server=broker.freenet6.net
passwd=your-password

server=montreal.freenet6.net
#or
server=amsterdam.freenet6.net

try :
tunnel_mode=v6anyv4
#or
tunnel_mode=v6udpv4

retry_delay=3
keepalive=yes
keepalive_interval=1
if_prefix=eth0
----- 8< ----- 8< -----

sudo /etc/init.d/tspc stop
sudo /etc/init.d/tspc start

check ipv6 connection :
ping6 -n ipv6.google.com

Monday, May 4, 2009

How to install TTF fonts in ubuntu 9.04


# Download the font from http://www.dafont.com
cp *.ttf /usr/local/share/fonts
cd /usr/local/share/fonts
sudo chown root:root *.ttf
sudo fc-cache

# if the application that needs to use the font (like gimp ) is open it needs to be restarted

Sunday, May 3, 2009

how to install conky on ubuntu 9.04


sudo apt-get install conky
zcat /usr/share/doc/conky/examples/conky.conf.gz > ~/.conkyrc

vim ~/.conkyrc
# change background to :
background yes
# change own_window_type to :
own_window_type override
# change alignment to :
alignment bottom_right

# on laptop
:%s/eth0/wlan0/g

# if there are MPD errors delete all the liles with MPD

Friday, May 1, 2009

squid : configure to cache dynamic content & large files

from : http://wiki.squid-cache.org/ConfigExamples/DynamicContent

vi /etc/squid/squid.conf
change :

acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
to :
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
------
Change :
maximum_object_size 4096 KB
to
maximum_object_size 40960 KB
------
Change :
cache_dir ufs /var/spool/squid 100 16 256
to (2 gigabyte with multithreaded access)
cache_dir aufs /var/spool/squid 2000 16 256

ubuntu : free kernel cache memory

sudo sh -c "sync && echo 1 > /proc/sys/vm/drop_caches"

RTMP downloading

linux :
http://linuxcentre.net/getiplayer/download/

windows :
http://www.orbitdownloader.com/

Thursday, April 30, 2009

boot ubuntu into single user resque mode

in grub press "e" and again press "e" on the kernel boot line.
add to the end of the line : "init=/bin/bash"

Friday, April 24, 2009

Ubuntu 9.04 : enable Ctrl+Alt+Backspace

sudo apt-get install dontzap

sudo dontzap --disable

edit :
ubuntu 9.10 -
http://jasonmiazga.com/wordpress/?p=14

Tuesday, April 21, 2009

Configuring Novatel U530 in Ubuntu

follow the instructions in :

http://www.timberwolf.ukfsn.org/debian-orange-3g.html

Notes :
* The scripts are not left justified after copy paste - fix it
* Change the dialed number in the last script from :

OK-AT-OK 'ATD*99***3#'
To
OK-AT-OK 'ATD*99#'
* Disconnect the wifi before doing pon orange

Friday, April 10, 2009

restore / repair / reset mysql root privileges

cat > restore_root_privileges.sql

update mysql.user set Super_priv='y' where user='root';
update mysql.user set Select_priv='y' where user='root';
update mysql.user set Insert_priv='y' where user='root';
update mysql.user set Update_priv='y' where user='root';
update mysql.user set Delete_priv='y' where user='root';
update mysql.user set Create_priv='y' where user='root';
update mysql.user set Drop_priv='y' where user='root';
update mysql.user set Reload_priv='y' where user='root';
update mysql.user set Shutdown_priv='y' where user='root';
update mysql.user set Process_priv='y' where user='root';
update mysql.user set File_priv='y' where user='root';
update mysql.user set Grant_priv='y' where user='root';
update mysql.user set References_priv='y' where user='root';
update mysql.user set Index_priv='y' where user='root';
update mysql.user set Alter_priv='y' where user='root';
update mysql.user set Show_db_priv='y' where user='root';
update mysql.user set Super_priv='y' where user='root';
update mysql.user set Create_tmp_table_priv='y' where user='root';
update mysql.user set Lock_tables_priv='y' where user='root';
update mysql.user set Execute_priv='y' where user='root';
update mysql.user set Repl_slave_priv='y' where user='root';
update mysql.user set Repl_client_priv='y' where user='root';
update mysql.user set Create_view_priv='y' where user='root';
update mysql.user set Show_view_priv='y' where user='root';
update mysql.user set Create_routine_priv='y' where user='root';
update mysql.user set Alter_routine_priv='y' where user='root';
update mysql.user set Create_user_priv='y' where user='root';

-----  8<  -----  8<  -----  8<  -----  8<  -----  8<  -----  8<  -----

sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
mysql -vv < restore_root_privileges.sql

sudo /etc/init.d/mysql restart
mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
mysql> quit;

(The password of the "debian-sys-maint" user is : sudo cat /etc/mysql/debian.cnf )

Thursday, April 9, 2009

Installing Ruby On Rails on Centos 4.5

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz
tar -zxvf ruby-1.8.7-p72.tar.gz
cd ruby-1.8.7-p72
./configure
make install
ruby -version

wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar -zxvf rubygems-1.3.1.tgz
cd rubygems-1.3.1
ruby setup.rb

gem install rails
cd /tmp
rails test
cd test

ruby script/server
lynx localhost:3000

gem install mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --with-mysql-config
wget http://dag.wieers.com/rpm/packages/libevent/libevent-1.3b-1.el4.rf.i386.rpm
rpm -ivh libevent-1.3b-1.el4.rf.i386.rpm
wget http://dag.wieers.com/rpm/packages/memcached/memcached-1.1.13-4.el4.rf.i386.rpm
rpm -ivh memcached-1.1.13-4.el4.rf.i386.rpm
/sbin/chkconfig --level 345 memcached on
/etc/init.d/memcached start
gem install memcache-client

Tuesday, April 7, 2009

install nfs client on ubuntu

sudo apt-get install portmap nfs-common

Thursday, April 2, 2009

Grant mysql privileges to remote

mysql -u root -pmypass

mysql> grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'mypass';
mysql> flush privileges;

Tuesday, March 3, 2009

html tidy tutorial

tidy -ashtml -i -utf8 -o index2.html index.html

Monday, March 2, 2009

Squid Proxy Hide System’s Real IP Address

http://www.cyberciti.biz/faq/squid-proxy-is-not-hiding-client-ip-address/

ubuntu linux bt headset

Per instructions in :
https://help.ubuntu.com/community/BluetoothHeadset

After every boot :

cat > bt_audio_on.sh
sudo hciconfig hci0 voice 0x0060
sudo modprobe snd_bt_sco
sudo modprobe sco
pactl load-module module-alsa-sink device=bluetooth
pactl load-module module-alsa-source device=bluetooth
sudo cat /proc/asound/cards

Wednesday, February 25, 2009

installing InternetExplorer on ubuntu linux

Download from :
http://www.tatanka.com.br/ies4linux/page/Main_Page
And install :
./ies4linux --no-gui --install-corefonts


Alternative :
http://appdb.winehq.org/appview.php?versionId=469


IE 7 (hacks) :
...
if I launch install with:
./ies4linux --install-ie7 --hack-ie7-proxy-settings --no-gui

IE7 works, except cookies,

if I install with:
./ies4linux --install-ie7 --no-gui

still no cookies and is very slow

Tuesday, February 24, 2009

ubuntu linux mind mapping apps

sudo apt-get install freemind
sudo apt-get install kdissert

Tuesday, February 17, 2009

ubuntu linux S.M.A.R.T disk monitoring

Monitor the disk heath and temperature

> install :
sudo apt-get install smartmontools
sudo apt-get install hddtemp

> monitor temperature :
sudo apt-get install sensors-applet
sudo killall gnome-panel
add to gnome-panel : "hardware sensors monitor"

> monitor health :
install GSmartControl (there is a deb download) @
http://gsmartcontrol.berlios.de/home/index.php/en/Home

restart gnome-panel

sudo killall gnome-panel

Sunday, February 15, 2009

linux network bandwidth monitors

sudo apt-get install nload

sudo apt-get install bmon

sudo apt-get install iptraf

sudo apt-get install iftop

sudo apt-get install ntop

Tuesday, February 10, 2009

sshmount tutorial on ubuntu linux

sudo apt-get install sshfs
mkdir /mnt/tmp
sudo sshfs user@server:/tmp /mnt/tmp
...
umount /mnt/tmp

linux banner commands

banner :
/usr/games/banner test

figlet :
sudo apt-get install figlet

toilet :
sudo apt-get install toilet

SSH reverse tunnel (Detached & Persistent)

nohup bash -c "while [ 1 ]; do ssh -o ExitOnForwardFailure=yes -o ConnectTimeout=2 -o TCPKeepAlive=yes -o ServerAliveInterval=2 -o ServerAliveCountMax=2 -N -R 2222:localhost:22 user@server.com; sleep 1; done" &

(after authorizing key with ssh-copy-id)
Example : run on boot of virtual machine that has a dynamic ip - connect via : ssh localhost:2222

Sunday, February 8, 2009

vimdiff shortcut keys

keys :

ctrl+w ctrl+w - switch windows
do - diff obtain
dp - diff put
[c - previous difference
]c - next difference
:diffupdate - diff update ;)
:syntax off - syntax off
zo - open folded text
zc - close folded text

ubuntu linux visual directory compare / diff tools

sudo apt-get install meld
meld dir1 dir2

sudo apt-get install kompare
kompare dir1 dir2

sudo apt-get install kdelibs4c2a
wget http://launchpadlibrarian.net/10679965/kdiff3_0.9.92-2ubuntu1_i386.deb
wget http://launchpadlibrarian.net/13473685/libkonq4_3.5.9-0ubuntu7_i386.deb
wget http://launchpadlibrarian.net/10679966/kdiff3-doc_0.9.92-2ubuntu1_all.deb
dpkg -i *.deb
kdiff3 dir1 dir2

http://www.sourcegear.com/diffmerge/
http://www.scootersoftware.com/index.php

DNS : dig // nslookup // host

$ host google.co.il
google.co.il has address 72.14.221.104
google.co.il has address 66.249.93.104
google.co.il has address 216.239.59.104
google.co.il mail is handled by 10 smtp3.google.com.
google.co.il mail is handled by 10 smtp4.google.com.
google.co.il mail is handled by 10 smtp1.google.com.
google.co.il mail is handled by 10 smtp2.google.com.


$ nslookup google.co.il
Server: 10.1.1.235
Address: 10.1.1.235#53

Non-authoritative answer:
Name: google.co.il
Address: 72.14.221.104
Name: google.co.il
Address: 66.249.93.104
Name: google.co.il
Address: 216.239.59.104


$ dig google.co.il

; <<>> DiG 9.5.0-P2 <<>> google.co.il
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53300
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.co.il. IN A

;; ANSWER SECTION:
google.co.il. 204 IN A 66.249.93.104
google.co.il. 204 IN A 216.239.59.104
google.co.il. 204 IN A 72.14.221.104

;; Query time: 5 msec
;; SERVER: 10.1.1.235#53(10.1.1.235)
;; WHEN: Sun Feb 8 12:48:41 2009
;; MSG SIZE rcvd: 78

Saturday, February 7, 2009

mysql - remove duplicate records


CREATE
TABLE new_table AS SELECT * FROM old_table WHERE 1 GROUP BY [COLUMN TO remove duplicates BY];

DROP
TABLE old_table;

RENAME
TABLE new_table TO old_table;

SSH socks proxy tunnel (Detached & Persistent)

make detached ssh socks proxy tunnel :

nohup bash -c "while [ 1 ]; do ssh -o ExitOnForwardFailure=yes -o ConnectTimeout=2 -o TCPKeepAlive=yes -o ServerAliveInterval=2 -o ServerAliveCountMax=2 -N -D 8080 user@server.com; sleep 1; done" &

(after authorizing key with ssh-copy-id)
Set firefox proxy to socks V5 - lolcahost:8080

Tuesday, January 27, 2009

Ubuntu mysql - phpMyAdmin

http://localhost/phpmyadmin/

Default L/P: root/mysql

( Alternative : sudo apt-get install mysql-admin )

Install LAMP on Ubuntu

sudo tasksel install lamp-server

sudo apt-get install build-essential
sudo apt-get install phpmyadmin
sudo apt-get install php5-cli php-pear

(https://help.ubuntu.com/community/ApacheMySQLPHP)

Wednesday, January 21, 2009

exporting firefox cookies for wget

Install the Export Cookies 1.0 firefox plugin (https://addons.mozilla.org/en-US/firefox/addon/8154)

and download with wget :
wget --load-cookies=./cookies.txt -i url.list

Friday, January 9, 2009

how to mirror a website using wget

update :
lftp -e "mirror -c" http://example.com/foobar/
# mirror into current directory :
wget -m -nH -E -k -N http://site.com

# mirror into site.com directory :
wget -m     -E -k -N http://site.com

Thursday, January 1, 2009

Install Flock On Ubuntu

Install Flock On Ubuntu

ssh & scp timeout & keepalive params

Prevent ssh & scp from getting stuck with the collowing command line parameters :

ssh -Y -C -e[ -o ConnectTimeout=2 -o TCPKeepAlive=yes -o ServerAliveInterval=2 -o ServerAliveCountMax=2 root@host