Using the tab extension is a nice thing. To make ssh know your hosts, add three lines in the ~/.ssh/config folder: Host mySpecialHost HostKeyAlias somehost-somewhere.ch Hostname somehost-somewhere.ch
Category: Linux
access NTFS partition from linux
http://ubuntuforums.org/showthread.php?t=217009
send big chunk of data over linux sockets
Sending a big chunk of data over linux sockets canĀ be tricky, because we need to call the write function multiple times. The following snippet assumes a valid socket filedescriptor “socketfd”, after the connection is established. Make sure that PACKETSIZE is smaller or equal to 2^16 and that nbytes equals the amount of bytes of… Continue reading send big chunk of data over linux sockets
convert a video to a MATLAB readable file in UNIX
Convert the movie by: ffmpeg -y -i input_file.avi -f avi -vcodec rawvideo -pix_fmt bgr24 -acodec pcm_s16le output_file.avi
Restart tomcat (the rude way)
To restart tomcat, fill the following two lines in a .sh file and make it executable (chmod +x [filename]): killall -s 9 java /[tomcat installation folder]/bin/startup.sh Warning: It kills all other java processes as well!
get sun java on debian based system
just type: sudo add-apt-repository “deb http://archive.ubuntu.com/ubuntu hardy main multiverse” sudo add-apt-repository “deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse” sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner” sudo apt-get update sudo apt-get install sun-java6-jdk
Stress-testing your website or put your website under siege
Sometimes one just want to check the stability of a web application under heavy load to check whether all ressources are sufficient or just for finding the limits of a webserver. This especially applies if you have some fancy backend calls assoiated with a HTTP request. A small Linux utility named “siege” helps you make… Continue reading Stress-testing your website or put your website under siege