recreate a public key using ssh-keygen
It is possible to recreate your ssh public key using the following:
ssh-keygen -y -f ./id_dsa > id_dsa.pub
It is possible to recreate your ssh public key using the following:
ssh-keygen -y -f ./id_dsa > id_dsa.pub
Use this command to generate .md5 hash files for all of the libraries in your maven repository, on mac:
find -E . -regex ".*(\.jar|\.pom)$" -exec sh -c "/sbin/md5 -q '{}' > '{}.md5'" \;
on linux try this:
find . -regextype posix-extended -regex ".*(\.jar|\.pom)$" -exec sh -c "/usr/bin/md5sum '{}' > '{}.md5'" \;
mySQL access using ssh: Tunneling to an internal system using ssh: Tunneling to an internal IMAP server through ssh when away from the office: Notice that the command is issued as root, this is to allow the forwarding of a privileged port (993 if the connection is SSL encrypted or 143 if not). By forwarding the privileged port there is no need to change any of the settings in you email program since the /etc/hosts file overrides the DNS lookup of your mail server.
To delete all of the subversion (.svn), CVS (.cvs) or hidden MAC .DS_Store folders from a directory tree use one of the following commands from the console:
rm -rf `find . -type d -name .svn`
rm -rf `find . -type d -name .cvs`
rm -rf `find . -type d -name .DS_Store`
for files use:
rm `find . -name ‘*.tmp’`
First lets create a gzip compressed tar file of the directory to be backed up:
tar --create --gzip --absolute-names --preserve-permissions --file=/backups/etc-`date +"%b_%d_%Y"`.tar.gz /etc
this will create a file called etc-Apr_15_2007.tar.gz in your /backups folder. To create a 7 day rolling backup you can use the following:
tar --create --gzip --absolute-names --preserve-permissions --file=/backups/etc-`date +"%A"`.tar.gz /etc
this will create a backup file called etc-Sunday.tar.gz.
To schedule the backup with cron add the following to your crontab file (crontab -e):
0 1 * * * tar --create --gzip --absolute-names --preserve-permissions --file=/backups/etc-`date +"\%A"`.tar.gz /etc
This will run the backup at 1 am every day. Note the use of \% to escape the % symbol in the crontab file.
HTTPit is a tiny multi-threaded executable java based HTTP server (under 10kb). It was built as a simple challenge to myself, how much functionality could be coded into a .jar file under 10Kb in size. It supports SSI and CGI (to the point that PHP applications function correctly) and supports both GET and POST request, 52 document types, virtual hosting ….
:. System Requirements
This server uses the regular expressions support added in JDK1.4.x and therefore requires that version as a minimum.
:. Download
:. Features
:. Usage
java -jar HTTPit.jar [options]
Options include:
:. Example usages
java -jar HTTPit.jar mime.tar=application/x-tar
Launch with additional support for files of type .tar
java -jar HTTPit.jar cgi.php=/usr/local/bin/php index.files=index.html,index.php
Launch with support for .php files using CGI and include index.php as a valid index file.
java -jar HTTPit.jar webroot.www.foo.com=./webroot2
Virtual host www.foo.com using the ./webroot2 folder as its root directory.
:. Static Page Load Test
The static page load test results for this server detailed below involved testing 10 concurrent users against a simple html page (using the openload tool, http://openwebload.sourceforge.net/ ).
openload http://192.168.0.100:8000/index.html 10
:. CGI Load Test
The CGI load test results for this server detailed below involved testing 10 concurrent users against a simple perl based CGI script (using the openload tool).
openload http://192.168.0.100:8000/cgi-bin/counter.cgi 10