Archive for the 'tutorial' Category

Just A Simple Trick to Keep SSH Proxy Always Online

the internal network of our office is not very well, and the SSH is always offline/inactive,
so I do not feel bright, so how to solve it?
I use a DOS batch to run plink to setup my SSH Proxy,
plink -N   -pw password user@my_ssh_server   -D 127.0.0.1:1080
so I modify my DOS batch to use infinite loop (aka endless loop) to keep plink always work,
for /L %%i in (1,0,2) do plink -N   -pw password user@my_ssh_server   -D 127.0.0.1:1080
btw, I do not like there is always a DOS Window in my taskbar, so I use TrayRun to force my batch to run minimized in the Windows task tray

the internal network of our office is not very well, and the SSH is always offline/inactive, so I do not feel bright, so how to solve it?I use a DOS batch to run plink to setup my SSH Proxy, plink -N   -pw password user@my_ssh_server   -D 127.0.0.1:1080so I modify my DOS batch to use infinite loop aka endless loop to keep plink always work,for /L %%i in (1,0,2) do plink -N   -pw password user@my_ssh_server   -D 127.0.0.1:1080btw, I do not like there is always a DOS Window in my taskbar, so I use TrayRun to force my batch to run minimized in the Windows task tray,

start trayrun.exe cmd /c for /L %%i in (1,0,2) do plink -N   -pw password user@my_ssh_server   -D 127.0.0.1:1080

PS.

Plink (PuTTY Link) is a command-line connection tool similar to UNIX ssh. It is mostly used for automated operations, such as making CVS access a repository on a remote server.

TrayRun is a simple application which allows you to run programs in the Windows task tray that weren’t designed that way. This is especially usefull for programs that need to be run on startup but generate a screen, e.g. console applications.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

Shrink Virtualbox VM And Free Up More Hard Disk Space

One of my server has only 300M space, I have to do something to free up my hard disk space.

I use VirtualBox with many Guests, so I decided shrink them.

refer to How To Shrink Your Virtualbox VM And Free Up Space For Your Hard Disk, when remount the filesystem in read-only mode, I got the following error,

mount: / is busy

after search, I got the answer, I should go to single user mode, or run the following command,

init 1

btw,  we can also try to use CloneVDI.

Features  of version 2.02 include:

  • Reads VDI,VHD,VMDK,Parallels HDD,RAW files and physical drives, writes VDI.
  • A simple GUI Interface.
  • A CLI interface too (for people who like that kind of thing!)
  • Ability to compact (discard unused blocks from) the clone, with no need to run sdelete/zerofree first.
  • Ability to enlarge the maximum size of a virtual disk, optionally enlarging the main partition too.
  • User choice to either keep the old UUID or generate a new one for the clone.
  • Some useful diagnostics about the source VDI, such as the partition map and the internal fileystem.
  • Better feedback while cloning: a progress bar and an estimated time to completion.
  • It seems to be significantly faster than “VBoxManage clonehd”.
  • Open source.
Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

MinGW Cross compiling Win32 Jpeg-turbo under Debian Lenny

In my previous article, LibJpeg vs LibJpeg-turbo, libjpeg-turbo is a fork of libjpeg that uses SIMD instructions to accelerate JPEG encoding and decoding, so I decide to replace libjpeg with libjpeg-turbo on my MinGW cross compiling environment, and here is the step.


wget http://downloads.sourceforge.net/project/libjpeg-turbo/1.1.0/libjpeg-turbo-1.1.0.tar.gz
tar zxf libjpeg-turbo-1.1.0.tar.gz
cd libjpeg-turbo-1.1.0
./configure --host=i686-pc-mingw32 --enable-static --disable-shared --prefix=/opt/mingw/usr/i686-pc-mingw32
make
make install

if you have not install nasm, you will get the following message,
checking for nasm... no
checking for nasmw... no
configure: error: no nasm (Netwide Assembler) found

then you need install nasm,
apt-get install nasm
and repeat
./configure --host=i686-pc-mingw32 --enable-static --disable-shared --prefix=/opt/mingw/usr/i686-pc-mingw32
make
make install

That is all.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride