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

Wednesday, December 31, 2008

The Perfect Desktop - Ubuntu 8.10

http://www.howtoforge.com/the-perfect-desktop-ubuntu-8.10

ubuntu compiz activation

http://www.howtoforge.com/enabling-compiz-fusion-on-ubuntu-8.10-nvidia

How To Set Up A Caching Reverse Proxy With Squid 2.6 On Debian Etch

http://www.howtoforge.com/how-to-set-up-a-caching-reverse-proxy-with-squid-2.6-on-debian-etch

How To Set Up A Caching Reverse Proxy With Squid 2.6 On Debian Etch

http://www.howtoforge.com/how-to-set-up-a-caching-reverse-proxy-with-squid-2.6-on-debian-etch

The Perfect Desktop - Ubuntu 8.10

http://www.howtoforge.com/the-perfect-desktop-ubuntu-8.10

ubuntu - switch between gdm and kdm and back

sudo dpkg-reconfigure gdm

Friday, December 12, 2008

Configure squid password access

(from http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch32_:_Controlling_Web_Access_with_Squid )

Password Authentication Using NCSA

You can configure Squid to prompt users for a username and password. Squid comes with a program called ncsa_auth that reads any NCSA-compliant encrypted password file. You can use the htpasswd program that comes installed with Apache to create your passwords. Here is how it's done:

1) Create the password file. The name of the password file should be /etc/squid/squid_passwd, and you need to make sure that it's universally readable.

[root@bigboy tmp]# touch /etc/squid/squid_passwd
[root@bigboy tmp]# chmod o+r /etc/squid/squid_passwd

2) Use the htpasswd program to add users to the password file. You can add users at anytime without having to restart Squid. In this case, you add a username called www:

[root@bigboy tmp]# htpasswd /etc/squid/squid_passwd www
New password:
Re-type new password:
Adding password for user www
[root@bigboy tmp]#

3) Find your ncsa_auth file using the locate command.

[root@bigboy tmp]# locate ncsa_auth
/usr/lib/squid/ncsa_auth
[root@bigboy tmp]#

4) Edit squid.conf; specifically, you need to define the authentication program in squid.conf, which is in this case ncsa_auth. Next, create an ACL named ncsa_users with the REQUIRED keyword that forces Squid to use the NCSA auth_param method you defined previously. Finally, create an http_access entry that allows traffic that matches the ncsa_users ACL entry. Here's a simple user authentication example; the order of the statements is important:

#
# Add this to the auth_param section of squid.conf
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

#
# Add this to the bottom of the ACL section of squid.conf
#
acl ncsa_users proxy_auth REQUIRED

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow ncsa_users

5) This requires password authentication and allows access only during business hours. Once again, the order of the statements is important:

#
# Add this to the auth_param section of squid.conf
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

#
# Add this to the bottom of the ACL section of squid.conf
#
acl ncsa_users proxy_auth REQUIRED
acl business_hours time M T W H F 9:00-17:00

#
# Add this at the top of the http_access section of squid.conf
#
http_access allow ncsa_users business_hours

Remember to restart Squid for the changes to take effect.

SSH Tunnel with SOCKS Proxy Forwarding

$ssh -D 8081 username@ip-address-of-ssh-server

On the browser configure socks v5 proxy to 127.0.0.1:8081

Saturday, November 22, 2008

Friday, November 14, 2008

ubuntu - clean old installations files to free disk space

Clean old installations files


sudo apt-get clean

Monday, September 8, 2008

Fix windows vista bricking because autoupdate

http://www.anguas.com/?p=47
Boot into recovery console and delete
“pending.xml” files from the c:\windows\winsxs

Friday, September 5, 2008

Disable the screensaver on windows Login screen

regedit

Key:
HKEY_USERS\.DEFAULT\Control Panel\Desktop

Element:
ScreenSaveActive

Change value from 1 to 0

Saturday, August 30, 2008

Monday, August 18, 2008

Read LBA sector from block device

dd if=/dev/sde of=dump2.bin iflag=direct bs=512 count=256 skip=277285647

skip=[LBA]

Free tools that save repettive typing

1. Texter
2. AutoHotKey/

Friday, August 15, 2008

Emule .49b No-Upload Mod

Install with the installer from http://www.emule.com
Download the moded executable
And replace the installed emule.exe in c:\program files\emule with the moded exe

The Best-ever Freeware Utilities List

Sunday, July 20, 2008

Thursday, July 10, 2008

Directory files synchronization for linux

- Graphical file synchronization JFileSynch : http://jfilesync.sourceforge.net/

- rsync
- unison
- mirrordir

installing java on ubuntu

sudo apt-get install sun-java6-jre

Friday, July 4, 2008

linux tips and tricks

- check the cpus bogomips :
$ cat /proc/cpuinfo | grep bogomips

- compare directory tree :
$ diff -r --brief /mnt/old /mnt/new

- copy file from directory tree, recreating the tree :
$ find ./ -name [makefile] | cpio -pdmv [/path/to/be/copied/to]

- HDD speed benchmarking :
/sbin/hdparm -tTf /dev/hda

- Scan the disk for bad blocks : unmount the partition (remount as readonly if necesary)
# fsck.ext3 -c -c -v -y /dev/sdb1

Set time from ntp setver :
# ntpdate -u -b -v time.nist.gov

weekly downloads update

UBCD4Win 3.20
Wireshark 1.01
DFX plugins v8.5 cracked
Divx.Author.v1.5.2.180.DC062508.Incl.KeyMaker-DVT
Winamp 5.5.4.2124 beta

Nokia PC Suite 7.0.7.0

Tuesday, July 1, 2008

ip takeover attack with arping to arp spoof

Disable the network of any machine from windows via wifi

1. install VirtualBox
2. install linux distro of choise in the virtual box as long as it has arping (ubuntu)
3. switch virtualbox network adapter into Host Interface mode
4. in windows Network Connections select VirtualBox Host Interface 1 and Wireless Network Connection, right click and choose bridge
5. in the linux that is running in virtualbox change the ip address to the attacked machine ip address and ping it with arping :


sudo ifconfig eth0 192.168.0.10 netmask 255.255.255.0
sudo arping -U -c 3 -I eth0 192.168.0.10
sudo arping -A -c 3 -I eth0 192.168.0.10


The attacked machine network should be disconnected

(iputils/arping source : http://www.skbuff.net/iputils/)

installing a development environment on ubuntu

sudo apt-get install build-essential

Sunday, June 29, 2008

Installing terminus programming font in konsole (kde)

sudo apt-get install xfonts-terminus
sudo apt-get install console-terminus
sudo fc-cache
fc-cache
konsole &

Monday, June 23, 2008

using putty as a SOCKSv5 proxy to tunnel firefox

without the need to run squid or anything on the linux side !

 

in putty configure a tunnel as "Dynamic" to port 8080 without destination :

image

Add :

image

 

in firefox :

configure proxy settings - SOCKS host 127.0.0.1, port 8080, SOCKS v5

image

Sunday, June 22, 2008

Ubuntu iscsi target tutorial

Download the iscsi target from http://iscsitarget.sourceforge.net/

wget http://surfnet.dl.sourceforge.net/sourceforge/iscsitarget/iscsitarget-0.4.16.tar.gz

compile :
tar -zxvf iscsitarget-0.4.16.tar.gz
cd iscsitarget-0.4.16/
make

I had to install :
apt-get -y install libssl-dev
make install

check that it starts :
cd /etc/init.d/
./iscsi-target start
./iscsi-target status


prepare a storage file (or use whole sd device)
cd /var; dd if=/dev/zero of=dev_iscsi_01.bin bs=1m count=100
this made a 100mb file

edit the iscsi target config file :
vim /etc/ietd.conf

change add the following lines :
Target iqn.2001-04.com.example:storage.disk1.sys1.xyz
Lun 0 Path=/var/dev_iscsi_01.bin,Type=fileio


restart the iscsi service :
/etc/init.d/iscsi-target start

connect from windows iscsi initiator and open the storage manager

Friday, June 6, 2008

Weekly downloads update

Microsoft Virtual Earth 3D 2.5 Beta
Komodo Edit Beta 4.4.0b1
Skype for Windows 3.8.0.139
VirtuaWin 4.1 Beta 1
save2pc 3.29
Taskbar Shuffle 2.5
The GIMP 2.4.6

cool putty mods

PuTTY Connection Manager : putty wrapper with tabs.

kitty : putty mod that ads improved bookmark management, auto-login and putty cygwin support (fix the puttycyg by copying the \usr\bin\cygwin1.dll into the kitty directory)

Wednesday, June 4, 2008

Ubuntu linux : Restart USB to reset stuck usb drives

$ sudo -s
# modprobe -vr ehci_hcd
# modprobe -v ehci_hcd

Sunday, June 1, 2008

fix in ubuntu : error while loading shared libraries: libcrypto.so.0.9.7: cannot open shared object file: No such file or directory

$ sudo -s
# cd /usr/lib
# ln -s libcrypto.so.0.9.8 libcrypto.so.0.9.7
# ln -s libssl.so.0.9.8 libssl.so.0.9.7

Saturday, May 31, 2008

Free video encoders for iPod

Essentials downloads after installing Hackintosh : FCE, Aperture, iLife

Enabling dns cache on ubuntu

# apt-get install dnsmasq

Add 127.0.0.1 to the top of /etc/resolv.conf

# cat /etc/resolv.conf
nameserver 127.0.0.1
nameserver 208.67.220.220
nameserver 208.67.222.222

To check that its working do:
$ dig google.com
$ dig google.com


Note - for machine with fixed IP

Saturday, May 24, 2008

andLinux beta 1 released

run ubuntu inside windows :
http://www.andlinux.org/

X server for windows

Xming :
http://www.straightrunning.com/XmingNotes/

configuring xterm to run with VT100 font and other tweaks

cd ~
cat > .Xresources
!xterm*font: -dec-terminal-medium-r-normal-*-14-*-*-*-*-*-iso8859-*
xterm*font: 8x13
xterm*font1: -*-*-*-*-*-*-2-*-*-*-*-*-*-*
xterm*font2: -misc-fixed-*-r-normal-*-8-*-*-*-*-*-iso8859-*
xterm*font3: -b&h-lucidatypewriter-bold-*-*-*-12-*-*-*-*-*-*-*
xterm*font4: -*-screen-bold-r-normal-*-16-*-*-*-*-*-iso8859-*
xterm*font5: -*-lucidatypewriter-medium-*-*-*-18-*-*-*-*-*-*-*
xterm*font6: -*-lucidatypewriter-medium-*-*-*-20-*-*-*-*-*-*-*
xterm*font7: -*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*

XTerm*background: black
XTerm*foreground: yellow
XTerm*pointerColor: yellow
XTerm*pointerColorBackground: black
XTerm*cursorColor: yellow
XTerm*internalBorder: 3
XTerm*loginShell: true
XTerm*rightScrollBar: true
XTerm*saveLines: 2000
XTerm*multiClickTime: 250
XTerm*Geometry: 128x50
XTerm*charClass: 33:48,37:48,45-47:48,38:48
XTerm*cursorBlink: true
XTerm*visualBell: false
XTerm*jumpScroll: true
XTerm*multiScroll: true
XTerm*scrollTtyOutput: false
XTerm*scrollKey: true
- - - - - - 8< - - - - - - 8< - - - - - -

xrdb -merge .Xresources
xterm

Downloads Update

Friday, May 16, 2008

Downloadsd Update


Azureus (Vuze) 3.0.5.2a for Windows
IcoFX 1.6.1
Notepad++ 4.9.2
eMule 0.49a - Final
Nav n go iGO My way v8.0 Final
doPDF 6.0.260
IsoBuster 2.4 Beta
Defraggler 1.01.073 Beta
UltraVNC 1.0.4 RC16
foobar2000 0.9.5.3 Beta 1

creating fedora 9 persistant live image on usb

- burn the live image iso file to a cd
- copy the iso file to a disk on key
- boot the live cd
- mount the harddisk : mkdir /mnt/sda1; mount /dev/sda1 /mnt/sda1
- plug the disk on key and check where it is mounted : mount
- copy the iso from the disk on key to the harddisk : cp /media/???/fedora9.iso /dev/sda1/
- delete all the files from the disk on key : rm -vr /media/???/*
- find the livecd-iso-to-disk.sh script : find / -name livecd-iso-to-disk.sh
- run the script : .../livecd-iso-to-disk.sh --overlay-size-mb 1024 /path/to/iso /dev/partition_of_your_usb_stick
for example if the disk on key is 2Gb then the overlay size is 1900Mb-700Mb :
livecd-iso-to-disk.sh --overlay-size-mb 1200 /mnt/sda1/fedora9.iso /dev/sdb1
- follow the onscreen instructions of the install script

Windows Mobile updates

New beta - DivX Video on Your Phone : http://labs.divx.com/MobileCommunity
New beta - SkyFire Browser : http://www.skyfire.com/

Thursday, May 8, 2008

Best free editor(s) for remote PHP developments

The only editors that i found which has the ability to open remote files via sftp and also have completion for smarty are:
1. Komodo Edit - FREE
2. UlrtaEdit + the Smarty plugin ftom the extras page

Monday, April 28, 2008

How to configure dhcp server on ubuntu tutorial

Commands :

$ sudo -s

# apt-get install dhcp3-server

# cd /etc/default/

# cp dhcp3-server dhcp3-server.bak

# vim dhcp3-server

Change :

INTERFACES=""

to :


INTERFACES="eth0"
Save,
Coomands :


# cd ../dhcp3/

# cp dhcpd.conf dhcpd.conf.bak

# vim dhcpd.conf


Change :


# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;
...


To :


# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

#default-lease-time 600;
#max-lease-time 7200;

Change :


# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}

To :



subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers 208.67.222.222, 208.67.220.220;
option domain-name "XXX.dyndns.org";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}


Save,


Coomands :



# /etc/init.d/dhcp3-server restart

Friday, April 25, 2008

updating ubuntu to new version

    1. Install update-manager-core if it is not already installed:

      sudo apt-get install update-manager-core
    2. Edit /etc/update-manager/release-upgrades and set:

      Prompt=normal
    3. Launch the upgrade tool:

      sudo do-release-upgrade
      sudo apt-get clean

Sunday, April 20, 2008

Saturday, April 19, 2008

Best eMule (mod)

Since the development of the official emule client has slowed very much as of lately, the best replacement is emule-extreme mod :

http://www.xtreme-mod.net/

 

Rating of all the emule mods : http://www.emule-mods.de/

The best $TERM

The $TERM that works the best in regular shell and screen is :

export TERM=linux

Monday, March 17, 2008

Building NAS with ubuntu / xubuntu and any old box

Download xubuntu alternate

Boot and choose to install command line system

 

installation :

sudo su -

apt-get install ssh

apt-get install samba

apt-get install smbfs

apt-get install ntfs-3g

 

vim /etc/samba/smb.conf

Change the follwing :

workgroup = MSHOME   # change to actual workgroup

security = user   # uncomment

guest account = [user]   # change to actual login user

invalid users = root   # uncomment

browseable = yes   # uncomment

writable = yes   # uncomment

[mnt]   # add to bottom
comment = mounts
writable = yes
locking = no
path = /mnt
public = yes    

smbpasswd -a [user]

/etc/init.d/samba restart

Display IP address in bash prompt

cat ~/.bashrc
export PS1=`/sbin/ifconfig eth0:1 | /usr/bin/perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1\n); exit 0; }'`:$PS1

 

Replace eth0:1 with the name of the network interface

Sunday, March 16, 2008

sux

su that preservs X11 :

$ sux -

Saturday, March 15, 2008

Downloads :

Adobe Photoshop Lightroom 1.4

EarthView 3.8.2

PCSX2 for Windows 0.9.5 SVN Revision 315

XnView for Windows 1.93

Joost for Windows 1.1.2 Beta

WPanorama 8.4.1eBoostr 2.0 Build 410 Beta

XMLPad 3.0.2

Notepad++ 4.8.2

Books downloads :

#1 :

http://www.ftp2share.net/folder/b0271ba0-fc18-4bc1-9c2e-c5d813fd7e74/e-book_21

OReilly.Advanced.Rails.Jan.2008.eBook-BBL/
OReilly.Building.a.Web.2.0.Portal.with.ASP.NET.3.5.Jan.2008.eBook-BBL/
OReilly.C.Sharp.3.0.Pocket.Reference.Feb.2008.eBook-BBL
OReilly.Learning.ActionScript.3.0.A.Beginners.Guide.Jan.2008.eBook-BBL
OReilly.LINQ.Pocket.Reference.Feb.2008.eBook-BBL
OReilly.Oracle.Essentials.Oracle.Database.11g.4th.Edition.Nov.2007.eBook-BBL
OReilly.Visualizing.Data.Jan.2008.eBook-BBL
OReilly.Windows.Vista.Annoyances.Tips.Secrets.and.Hacks.Jan.2008.eBook-BBL
OReilly.X.Power.Tools.Jan.2008.eBook-BBL
OReilly.Big.Book.of.Windows.Hacks.Oct.2007.eBook-BBL

OReilly.Dynamic.Learning.Dreamweaver.CS3.Nov.2007.eBook-BBL

OReilly.Head.First.C.Sharp.Nov.2007.eBook-BBL
OReilly.Linux.Networking.Cookbook.Nov.2007.eBook-BBL
OReilly.Network.Security.Assessment.2nd.Edition.Nov.2007.eBook-BBL
OReilly.sendmail.4th.Edition.Oct.2007.eBook-BBL
OReilly.The.Art.of.Agile.Development.Oct.2007.eBook-BBL
Addison.Wesley.Ajax.Security.Dec.2007.eBook-BBL
Addison.Wesley.GPU.Gems.3.Aug.2007.eBook-BBL
Addison.Wesley.Mac.OS.X.Leopard.Phrasebook.Nov.2007.eBook-BBL
IBM.Press.Understanding.DB2.2nd.Edition.Jan.2008.eBook-BBL
Microsoft.Press.Microsoft.Windows.PowerShell.Scripting.Guide.DEC.2007.eBook-UnderPl
Microsoft.Press.Microsoft.Exchange.Server.2007.Administrators.Companion.Jun.2007.eBook-BBL
Microsoft.Press.Microsoft.Expression.Web.Step.by.Step.Nov.2007.eBook-BBL
Microsoft.Press.Programming.Excel.Services.Jun.2007.eBook-BBL
Microsoft.Press.Windows.SharePoint.Services.3.0.Inside.Out.Dec.2007.eBook-BBL

Microsoft.Press.Windows.Vista.Home.Networking.Oct.2007.eBook-BBL

New.Riders.Press.Stylin.with.CSS.A.Designers.Guide.2nd.Edition.Dec.2007.eBook-BBL
Packt.Publishing.ASP.NET.Data.Presentation.Controls.Essentials.Dec.2007.eBook-BBL
Packt.Publishing.LINQ.Quickly.Nov.2007.eBook-BBL
Packt.Publishing.Mastering.Joomla.1.5.Extension.and.Framework.Development.Nov.2007.eBook-BBL
Packt.Publishing.Xen.Virtualization.A.Practical.Handbook.Dec.2007.eBook-BBL
Packt.Publishing.Object.Oriented.Programming.with.PHP5.Dec.2007.eBook-BBL
Packt.Publishing.Practical.Data.Analysis.and.Reporting.with.BIRT.Jan.2008.eBook-BBL
Packt.Publishing.Tapestry.5.Building.Web.Applications.Jan.2008.eBook-BBL

 

 

#2 :

http://www.ftp2share.com/folder/e15c613f-7664-4b4a-b9ad-8006d9a3bdf1/e-book_20

Focal.Press.Creative.Suite.3.Integration.Jul.2007.eBook-BBL

Focal.Press.Flash.plus.After.Effects.Feb.2008.eBook-BBL
McGraw.Hill.Ajax.The.Complete.Reference.Feb.2008.eBook-BBL
McGraw.Hill.iPod.Repair.QuickSteps.Nov.2007.eBook-BBL
McGraw.Hill.SAP.Business.Information.Warehouse.Reporting.Jan.2008.eBook-BBL
McGraw.Hill.Business.Intelligence.with.Microsoft.Office.PerformancePoint.Server.2007.Feb.2008.eBook-BBL
McGraw.Hill.CNET.Do.It.Yourself.Home.Networking.Projects.Dec.2007.eBook-BBL
McGraw.Hill.Delivering.Carrier.Ethernet.Extending.Ethernet.Beyond.the.LAN.Oct.2007.eBook-BBL
McGraw.Hill.eBay.QuickSteps.2nd.Edition.Oct.2007.eBook-BBL
McGraw.Hill.How.to.Do.Everything.Mac.Feb.2008.eBook-BBL
McGraw.Hill.Oracle.Database.11g.DBA.Handbook.Dec.2007.eBook-BBL

OReilly.The.Ruby.Programming.Language.Jan.2008.eBook-BBL

Wiley.Video.Compression.and.Communications.2nd.Edition.Nov.2007.eBook-BBL
Cisco.Press.PacketCable.Implementation.Feb.2007.eBook-BBL
Microsoft.Press.3D.Programming.for.Windows.Jul.2007.eBook-BBL
Microsoft.Press.Inside.Microsoft.SQL.Server.2005.Query.Tuning.and.Optimization.Sep.2007.eBook-BBL
Microsoft.Press.Internet.Information.Services.IIS.7.0.Administrators.Pocket.Consultant.Dec.2007.eBook-BBL
Microsoft.Press.MCITP.Self.Paced.Training.Kit.Exam.70-623.Sep.2007.eBook-BBL
Microsoft.Press.Programming.Microsoft.Composite.UI.Application.Block.and.Smart.Client.Software.Factory.Jul.2007.eBook-BBL
Sams.ASP.NET.3.5.Unleashed.Jan.2008.eBook-BBL
Sams.Microsoft.ISA.Server.2006.Unleashed.Dec.2007.eBook-BBL
Sams.openSUSE.Linux.Unleashed.Nov.2007.eBook-BBL
Sams.Microsoft.Windows.Vista.Management.and.Administration.Dec.2007.eBook-BBL

Tuesday, March 11, 2008

Trace perl script (like bash -x)

Install :

$ sudo cpan Devel::Trace

Run:

$ perl -d:Trace [filename.pl]

Friday, February 29, 2008

Start hamachi at boot on ubuntu

$ cd /etc/init.d

$ sudo su

$ cat > hamachi

paste the following script :

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

#!/bin/bash
###################################
### Start-up script for Hamachi ###
###################################
USER=[username]
case "$1" in
start)
/sbin/tuncfg

/bin/su - $USER -c "rm -f /home/$USER/.hamachi/.lock"

/bin/su - $USER -c "/usr/bin/hamachi start"
;;
stop)
/bin/su - $USER -c "/usr/bin/hamachi stop"

/bin/su - $USER -c "rm -f /home/$USER/.hamachi/.lock"

;;
restart|force-reload)

/bin/su - $USER -c "/usr/bin/hamachi stop"

/bin/su - $USER -c "rm -f /home/$USER/.hamachi/.lock"

/bin/su - $USER -c "/usr/bin/hamachi start"
;;
*)
exit 1
;;
esac
exit 0

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

$ vim hamachi

change in line 5 USER=to your username

$ chmod a+x hamachi

$ rcconf

check hamachi and select OK


$ chmod -R a+rw /home/[username]/.hamachi/

$ chmod a+rwx /home/[username]/.hamachi/


Downloading files with curl (resume transfer)

$ curl -C - -O  http://mirrors.kernel.org/opensuse/distribution/10.3/iso/dvd/openSUSE-10.3-GM-DVD-i386.iso

Sunday, February 24, 2008

Installing hamachi on ubuntu

debian:/tmp# tar -zxvf hamachi-0.9.9.9-20-lnx.tar.gz
hamachi-0.9.9.9-20-lnx/
hamachi-0.9.9.9-20-lnx/Makefile
hamachi-0.9.9.9-20-lnx/LICENSE
hamachi-0.9.9.9-20-lnx/README
hamachi-0.9.9.9-20-lnx/LICENSE.tuncfg
hamachi-0.9.9.9-20-lnx/LICENSE.openssh
hamachi-0.9.9.9-20-lnx/LICENSE.openssl
hamachi-0.9.9.9-20-lnx/hamachi
hamachi-0.9.9.9-20-lnx/tuncfg/
hamachi-0.9.9.9-20-lnx/tuncfg/Makefile
hamachi-0.9.9.9-20-lnx/tuncfg/tuncfg.c
hamachi-0.9.9.9-20-lnx/tuncfg/tuncfg
hamachi-0.9.9.9-20-lnx/CHANGES

debian:/tmp# cd hamachi-0.9.9.9-20-lnx
debian:/tmp/hamachi-0.9.9.9-20-lnx# ls
CHANGES  hamachi  LICENSE  LICENSE.openssh  LICENSE.openssl  LICENSE.tuncfg  Makefile  README  tuncfg

debian:/tmp/hamachi-0.9.9.9-20-lnx# make install
Copying hamachi into /usr/bin ..
Creating hamachi-init symlink ..
Compiling tuncfg ..
Copying tuncfg into /sbin ..

Hamachi is installed. See README for what to do next.

debian:/tmp/hamachi-0.9.9.9-20-lnx# tuncfg

debian:/tmp/hamachi-0.9.9.9-20-lnx# hamachi-init
Initializing Hamachi configuration (/root/.hamachi). Please wait ..

  generating 2048-bit RSA keypair .. ok
  making /root/.hamachi directory .. ok
  saving /root/.hamachi/client.pub .. ok
  saving /root/.hamachi/client.pri .. ok
  saving /root/.hamachi/state .. ok

Authentication information has been created. Hamachi can now be started with
'hamachi start' command and then brought online with 'hamachi login'.

debian:/tmp/hamachi-0.9.9.9-20-lnx# hamachi start
Starting Hamachi hamachi-lnx-0.9.9.9-20 .. ok
debian:/tmp/hamachi-0.9.9.9-20-lnx# hamachi set-nick [nick]
Setting nickname .. ok
debian:/tmp/hamachi-0.9.9.9-20-lnx# hamachi login
Logging in ....>....... ok
debian:/tmp/hamachi-0.9.9.9-20-lnx# hamachi join [name]
Password:
Joining [name] .. ok

debian:/tmp/hamachi-0.9.9.9-20-lnx# hamachi go-online [name]
Going online in zatz0r .. ok

Friday, February 22, 2008

php/html editors for windows and linux

Some editors for php/html development :

Linux - Bluefish (apt-get install bluefish / yum install bluefish)

Windows - NuSphere PhpED - seach in emule "phped yag"

windows mobile warez

PPC Warez is the best board for all windows mobile software, games, gps related downloads

iGo/Mio latest maps (2008)

Here is the latest map collection, enjoy

 iGO/Mio latest maps

Wednesday, February 20, 2008

Tabbed putty shell

PuTTY Connection Manager is a shell that allows to run several instances of putty in tabs.

 

andLinux - run ubuntu inside windows ala cygwin style

andLinux is an almost full ubuntu distribution that runs inside windows with a linux kernel - cygwin style with very high performance as opposed of vmware that is taxing on system resources as it is an vm emulation.



Xming - free xserver for windows

Xming is a free xserver for windows

works perfectly with putty

Sunday, February 17, 2008

recovering a disk with bad sectors by copying it to another disk with linux

In this tutorial example the dump is from hda to hdb (the hdb disk has to be same size of larger)

# dd_rescue -A -v /dev/hda /dev/hdb

ramdisk in linux tutorial

 

# mkdir /mnt/ramdisk

# mount -t tmpfs none /mnt/ramdisk

map bad sectors on a mounted ext3 partition tutorial

Mount partition as readonly :

# mount -f -r -o remount /dev/hda1

(replace had1 with your mounted ex3 partition)

Scan and mark badblocks :

# e2fsck -c -C 0 -y -v /dev/hda1

(replace had1 with your ex3 partition)

Wednesday, February 13, 2008

mount a directory in another directory (ln -s replacement that works inside chroot)

To allow access to other directory/file from apachee/ftp chroot where ln -s dosent work use :

 

mount --bind olddir newdir

 

from mount man :

Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is
              mount --bind olddir newdir
       After this call the same contents is accessible in two places.  One can also remount a single file (on a single file).

Saturday, February 9, 2008

New downloads update

 

TVUPlayer 2.3.5 beta 4

XAMPP for Windows 1.6.6

Sysinternals Suite Build 02/04/08

Gom Player 2.1.9.3752

Force uninstall of windows applications

use :

msicuu
and
msizap

Linux Performance analyzing tools

nmon performance: A free tool to analyze AIX and Linux performance
Dstat: Versatile resource statistics tool
Linux Benchmarking tools

Simple Home File Server (Based On Ubuntu)

Link to the tutorial :

Simple Home File Server (Based On Ubuntu)

Install Photoshop CS2 on Your Ubuntu PC

Link to the tutorial :

Install Photoshop CS2 on Your Ubuntu PC

progressbar when copying files on linux with cp

A link to a script that displays a progress bar in cp :
http://chris-lamb.co.uk/2008/01/24/can-you-get-cp-to-give-a-

Tuning mysql performance read & write

mysql r/w optimization tips :
read
write

Nagios 3.0 - A Extensible Host and Service Monitoring

http://www.novell.com/coolsolutions/feature/19807.html

ocfs tutorial

http://www.novell.com/coolsolutions/feature/18287.html

Monitor Website in Real-Time with Apachetop

http://www.howtogeek.com/howto/ubuntu/monitor-your-website-in-real-time-with-apachetop/

.vimrc

set nocompatible " must be the first line
filetype on
filetype indent on
filetype plugin on
set laststatus=2


set statusline=%<%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P
syntax on
colorscheme murphy
set number
set tabstop=4
set shiftwidth=4
set ignorecase
set autoindent
set hlsearch
set diffopt+=iwhite
set ruler
set cul

Installing Ubuntu hardy alpha-3 on Lenovo / Ibm ThinkPad T60

Problematic hardware on my specific machine variant :
Intel 82573L copper NIC
Atheros AR5418 wifi NIC
ATI Radeon X1300 Display
1. get the ubuntu as the kubuntu power managment dosent work (didnt check the other variations)
2. check your hardware : sudo su -; lshw | less
3. Install the Intel copper NIC driver for the Intel 82573L chip : http://downloadcenter.intel.com/Detail_Desc.aspx?strState=LIVE&ProductID=983&DwnldID=9180&lang=eng
(follow the instructions, connect the cable before the make / make install or else the phy is powered down to save power)
4. Install the Atheros AR5418 wireless network driver : get the latest driver source from the http://madwifi.org/ svn and compile/isntall per instructions, reboot and use the network manager to configure the wireless network as usual.

vim tabs tutorial

open multiple files in tabs $vim -p file1, file2, ... file10
switch between tabs :tabn / :tabp
add another tab :tabe filename
The full documentation of the tabs system can be accessed with :help tabs

Distributed administration using SSH

http://www.ibm.com/developerworks/aix/library/au-satdistad

HowTo: Emergency Reboot a Remote Machine

http://portal.itauth.com/2007/10/29/linux-howto-emergency-reboot-remote-machine

The first step is to enable the SysRq system, if it's disabled:

echo 1 > /proc/sys/kernel/sysrq

Now you can reboot (instantly, be forewarned) if the machine is hung:

echo b > /proc/sysrq-trigger

LatencyTOP

http://www.latencytop.org/

LatencyTOP is a Linux tool for software developers (both kernel and
userspace), aimed at identifying where system latency occurs, and what
kind of operation/action is causing the latency to happen. By identifying
this, developers can then change the code to avoid the worst latency
hiccups.

HowTo: Linux: Double your disk read performance in a single command

http://portal.itauth.com/2007/11/20/howto-linux-double-your-disk-read-performance-single-command

 


Here's the magic to double sequential read performance:

[root@cyberman mydb]# blockdev --getra /dev/sdb
256
[root@cyberman mydb]# blockdev --setra 262144 /dev/sdb

nixcraft Linux tutorial collection, part-2

http://www.cyberciti.biz/tips/apache-url-rewriting-examples.html
http://www.cyberciti.biz/tips/ubuntu-linux-on-usb-flash-pen-drive.html
http://www.cyberciti.biz/tips/install-photoshop-cs2-on-linux.html
http://www.cyberciti.biz/faq/linux-unix-measure-lateceny-throughput-of-webserver/
http://www.cyberciti.biz/tips/rhel-linux-optimize-3ware-raid-read-performance.html
http://www.cyberciti.biz/faq/howto-rhel-install-xcahce-php-opcode-cacher/
http://www.cyberciti.biz/tips/lighttpd-apache-run-xcache-in-chrooted-jail.html
http://www.cyberciti.biz/tips/linux-use-rsync-transfer-mirror-files-directories.html
http://www.cyberciti.biz/tips/how-do-i-sync-data-between-two-load-balanced-linuxunix-servers.html
http://www.cyberciti.biz/tips/howto-duplicate-directory-using-mirrordir-command.html
http://www.cyberciti.biz/faq/apache-web-server-prevent-directory-folder-listing/
http://www.cyberciti.biz/faq/linux-unix-autologin-cron-ftp-script/
http://www.cyberciti.biz/faq/linux-http-https-reverse-proxy-load-balancer/
http://www.cyberciti.biz/faq/rhel-centos-debian-ubuntu-jumbo-frames-configuration/
http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/
http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
http://www.cyberciti.biz/faq/linux-burn-iso-images-to-cds-and-cd-rws-howto/
http://www.cyberciti.biz/tips/how-do-i-write-cd-at-debain-linux-command-prompt.html
http://www.cyberciti.biz/tips/splits-directory-into-multiple-with-equal-size-for-iso-burning-purpose.html
http://www.cyberciti.biz/tips/rhel-centos-linux-install-configure-rssh-shell.html
http://www.cyberciti.biz/faq/howto-use-linux-truss-strace-command/
http://www.cyberciti.biz/faq/tunning-linux-ext3-filesystem/
http://www.cyberciti.biz/tips/speed-up-apache-20-web-access-or-downloads-with-mod_deflate.html
http://www.cyberciti.biz/tips/setting-processor-affinity-certain-task-or-process.html
http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html
http://www.cyberciti.biz/tips/howto-write-perl-script-to-monitor-disk-space.html
http://www.cyberciti.biz/tips/rhel-centos-mounting-remote-filesystem-using-sshfs.html
http://www.cyberciti.biz/tips/howto-log-user-activity-using-process-accounting.html
http://www.cyberciti.biz/tips/linux-how-to-encrypt-and-decrypt-files-with-a-password.html
http://www.cyberciti.biz/tips/howto-monitor-and-restart-linux-unix-service.html
http://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html
http://www.cyberciti.biz/tips/linux-audit-files-to-see-who-made-changes-to-a-file.html
http://www.cyberciti.biz/tips/howto-linux-kill-and-logout-users.html
http://www.cyberciti.biz/tips/sending-mail-with-attachment.html
http://www.cyberciti.biz/tips/linux-bond-or-team-multiple-network-interfaces-nic-into-single-interface.html
http://www.cyberciti.biz/tips/how-to-mount-remote-windows-partition-windows-share-under-linux.html
http://www.cyberciti.biz/tips/howto-configure-ubuntu-fedora-linux-pptp

nixcraft Linux tutorial collection, part-1

Collection of the best tips from nixcraft :


http://www.cyberciti.biz/tips/how-do-i-drop-or-block-attackers-ip-with-null-routes.html
http://www.cyberciti.biz/faq/howto-null-route-an-attackers-ip/
http://www.cyberciti.biz/faq/ip_conntrack-table-ful-dropping-packet-error/
http://www.cyberciti.biz/faq/unable-to-display-remote-x-applications-through-telnet-in-linux/
http://www.cyberciti.biz/tips/linux-iptables-how-to-specify-a-range-of-ip-addresses-or-ports.html
http://www.cyberciti.biz/tips/linux-increasing-or-decreasing-tcp-sockets-timeouts.html
http://www.cyberciti.biz/tips/mysql-performance-tuning-tips-and-techniques.html
http://www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html
http://www.cyberciti.biz/tips/lighttpd-mod_proxy-to-run-php-fastcgi-app-server.html
http://www.cyberciti.biz/tips/speedup-linux-unix-web-site.html
http://www.cyberciti.biz/tips/howto-create-high-performance-web-site-pages.html
http://www.cyberciti.biz/tips/linux-unix-download-accelerator.html
http://www.cyberciti.biz/tips/distributed-administration-using-ssh.html
http://www.cyberciti.biz/tips/execute-commands-on-multiple-linux-or-unix-servers.html
http://www.cyberciti.biz/tips/linux-creating-shared-storage-with-ocfs2-xen.html
http://www.cyberciti.biz/tips/linux-procfs-file-descriptors.html
http://www.cyberciti.biz/tips/set-up-web-server-cluster.html
http://www.cyberciti.biz/tips/howto-run-wget-in-background.html
http://www.cyberciti.biz/tips/linux-wget-your-ultimate-command-line-downloader.html
http://www.cyberciti.biz/tips/howto-rhel-centos-fedora-squid-installation-configuration.html
http://www.cyberciti.biz/tips/how-to-use-screen-command-under-linux.html
http://www.cyberciti.biz/tips/backup-postgres-mysql-securely-using-ssh.html
http://www.cyberciti.biz/tips/how-fast-is-linux-sata-hard-disk.html
http://www.cyberciti.biz/tips/install-photoshop-cs2-on-linux.html
http://www.cyberciti.biz/tips/howto-see-grep-command-output-in-colours.html
http://www.cyberciti.biz/tips/linux-increase-outgoing-network-sockets-range.html
http://www.cyberciti.biz/tips/fdisk-unable-to-create-partition-greater-2tb.html
http://www.cyberciti.biz/tips/rhel-centos-fedora-linux-iscsi-howto.html
http://www.cyberciti.biz/faq/howto-setup-debian-ubuntu-linux-iscsi-initiator/
http://www.cyberciti.biz/faq/linux-open-iptables-firewall-port-22-23/
http://www.cyberciti.biz/faq/howto-display-iros-under-linux/
http://www.cyberciti.biz/faq/proxy-authentication-in-linux-unix-squid-cache/
http://www.cyberciti.biz/tips/howto-linux-iptables-block-p2p-traffic.html
http://www.cyberciti.biz/faq/delete-all-root-email-mailbox/
http://www.cyberciti.biz/tips/howto-find-memory-used-by-program.html
http://www.cyberciti.biz/faq/linux-unix-tunneling-xwindows-securely-over-ssh/
http://www.cyberciti.biz/tips/linux-unix-profiling-network-connectivity-with-fping.html
http://www.cyberciti.biz/tips/linux-unix-subversion-svn-howto.html

Compiling emule that dosent upload - leecher mod

Visual Studio 2005 is needed to compile emule.
The easiest way to compiling emule is to download the emule source together with the libraries, the best one is emule-morphXT mod :
http://emulemorph.sourceforge.net/modules.php?name=Downloads&d_op=viewdownload&cid=2
Moding emule for no upload :
Find the file : UploadQueue.cpp
in it change the function :
"void CUploadQueue::AddClientToQueue(CUpDownClient* client, bool bIgnoreTimelimit) {"
add a "return;" below the declaration so that the function return immediately.

.screenrc

here is a .screenrc that displays various statistics like cpu, load avarages, memory, bandwidth utilization and display and easily switch between virtual windows (work like tabs)
escape char : ^x
create window ^x-c
switch between windows : F11/F12
Screenshot :

$ cat > ~/.screenrc
---------- 8< ---------- 8< ---------- 8< ----------




vbell on
startup_message off
shell -bash
term linux
#term screen-bce
#term xterm
defbce on
defscrollback 2000
defescape ^Xx
escape ^Xx
term screen-256color
defutf8 on
bindkey -k F1 prev # F11
bindkey -k F2 next # F12

backtick 0 10 10 awk '{ printf "%sC", $2 }' /proc/acpi/thermal_zone/THRM/temperature

backtick 1 60 60 awk '{if ($1=="MemTotal:") mt = $2; if ($1=="MemFree:") mm = $2; if ($1=="Buffers:") mb = $2; if ($1=="Cached:") mc = $2} END {printf ("%2.1f"), ((mt-(mm+mb+mc)) * 100 / mt);print "%M"}' /proc/meminfo

backtick 2 60 50 awk '{if ($1=="SwapFree:") fs = $2; if ($1=="SwapTotal:") ts = $2} END {printf ("%2.1f"),((ts-fs) * 100 / ts );print "%S"}' /proc/meminfo

backtick 3 0 0 awk 'BEGIN {file = "/proc/stat";while (a==a) {getline < u="$2-up;s=" n="$4-np;i=" up="$2;sp=" np="$4;i" p="$5;close(file);system(" file="/proc/net/dev" a="=" d="substr($1,6,10);u=" printf="" 1f="" k="" s="" pri="">
ntf "%4.1f k/s\n",((u-up)/1024)}};close(file);dp=d;up=u;system("sleep 2")}}'

caption always "%{wk}%H|%{wk}%0` %1` %2` %3` |%4` %{wk}| %{wk}%l%{wk} | %Y-%m-%d %c | %{+b w}%-w%{-b kw}%n %t%{-}%+w %-= %=%{wk}|"

borland colorscheme for vim

Download the borland.vim file and follow the instructions to install from : http://www.vim.org/scripts/script.php?script_id=92
Screenshot :

.vimrc

syntax on
colorscheme murphy
set number
set tabstop=4
set shiftwidth=4
set ignorecase
set autoindent
set hlsearch
set diffopt+=iwhite
set ruler

installing squid on windows

Download squid for windows from :

http://squid.acmeconsulting.it/download/squid-2.6.STABLE18-bin.zip

Read the installation instructions in the documentation.

Change the c:\squid\etc\squid.conf from the default :

acl home src 192.168.0.0/255.255.255.0 # (change if different network subnet)

http_access allow home

cache_dir aufs c:/squid/var/cache 1000 16 256

dns_nameservers 208.67.222.222

run the following commands :

mkdir c:\squid\var\cache

c:\squid\sbin\squid -z

Done, run squid :

squid

configuring squid proxy on ubuntu

$ sudo su -
# apt-get install squid
# vi /etc/squid/squid.conf
configure the proxy port to 8081 (this the port that needs to be configured in the browser)
search for "http_port" and change to "http_port 8081"
configure the cache to use 2GByte storage
search for "cache_dir" and change to "cache_dir aufs /var/spool/squid 2000 16 256"
(change the storage type from ufs to aufs, explanation from the squid.conf file :
# The aufs store type:
#
# "aufs" uses the same storage format as "ufs", utilizing
# POSIX-threads to avoid blocking the main Squid process on
# disk-I/O. This was formerly known in Squid as async-io.)
configure the access list for example :
acl our_networks src 192.168.0.1/24
http_access allow our_networks
start squid :
# /etc/init.d/squid restart

We Come In Peace Shirt



Get it here

htop - replacement for the top command in linux















htop - an interactive process viewer for Linux

htop is an interactive process viewer for Linux. It is a text-mode application (for console or X terminals). works with Linux 2.4 and 2.6.

http://htop.sourceforge.net/

Monday, January 28, 2008

.screenrc

A .screenrc file that :
- Displays a nice status line on the bottom of the screen
- opens 8 terminals by default.
- switch between windows with Alt-Arrow keys & Alt number

---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
$ cat .screenrc
defscrollback 3000

screen
screen
screen
screen
screen
screen
screen
screen

startup_message off

bindkey "^[1" select 0
bindkey "^[2" select 1
bindkey "^[3" select 2
bindkey "^[4" select 3
bindkey "^[5" select 4
bindkey "^[6" select 5
bindkey "^[7" select 6
bindkey "^[8" select 7
bindkey "^[9" select 8

bindkey -k k; quit

bindkey "^[^[OD" prev
bindkey "^[^[OC" next

select 0

caption string "%{= KW} %-w%{= BW}=%n %t=%{-}%+w %=%{= Yb} %H %{= KW} %{= Yb} %c:%s %d/%m/%Y"
caption always