About

Proin accumsan urna in mi. Aenean elementum egestas tortor. Donec neque magna, auctor a, dapibus sit amet, facilisis sit amet, ligula..

Killer Note-taking App

September 7th, 2009

I’m back to school as of Aug. 24th for my junior year at UHV.

This semester I’m trying to keep all of my notes and school related activities in electronic form, so I’ve been looking for an app to assist.

I’ve tried a bunch of tools, including Tomboy, Zim, Notalon, and others.

But today I found KeepNote. This thing is amazing. It’s got quite a few features that make it a killer app, but this short screen capture shows how simple it is to insert an image in your notes.

Why can’t everything be this simple and intuitive?

SSH tunnel chaining

April 17th, 2009

Let’s say you have a server (server1) running a web app on port 9080 inside a firewalled vlan (vlan 1). Only ssh traffic on port 22 is allowed in to this vlan, and only from second management vlan (vlan 2). You are not in either of these vlans, but you can access a machine (server2) inside vlan 2.

Now, you need to access the web app. The solution is to use SSH tunnels, chaining a tunnel from your machine to the first in vlan 2, and then from that machine to the application server in vlan 1.

Use the following command to pull this off:

ssh -oproxycommand="ssh -qaxT server2 netcat %h %p" -L 9080:localhost:9080 server1

Now, you can access the web app from a browser by visiting the following URL: http://localhost:9080/.

If you need additional ports to be forwarded, add them by modifying the command as follows:

ssh -oproxycommand="ssh -qaxT server2 netcat %h %p" -L 9080:localhost:9080 -L 9043:localhost:9043 -L 9060:localhost:9060 server1

This comes from O’reilly’s “SSH, The Secure Shell: The Definitive Guide” aka the snail book.

A recent project required the automated upload of a file to a TumbleWeed (now SecureTransport) server. The project uses a password-protected digital certificate for authentication. The file upload is being done from a linux host, so I can’t use the provided windows-only client. cURL to the rescue!

To get started, concatenate your private key and the public certificate as follows. Assuming that private key is in a file called “key.pem” and the certificate is held in “cert.pem”:

cat key.pem cert.pem > combined.pem

Now, to transfer the file, two commands will be used. The first command connects to the site and saves all cookies to a file.

curl -vv -c /tmp/cookie -E combined.pem:password https://host.destination.com/

The “-vv” option tells curl to increase the verbosity the messages it produces. This is useful for debugging and can be removed. The “-c” option tells curl to store the cookies sent from the host in a temporary file. The “-E” option tells curl what certificate to use for authentication – note that the file name is followed by a colon, then the password for the private key in that file. Also note that the filename specified is the combined private key/public cert that we created above. Finally, the host is the last parameter.

The second command connects to the site and echos back the cookie along with the other options to upload the file.

curl -vv -b /tmp/cookie -T outgoing/CEE090305.txt -E combined.pem:password https://host.destination.com/

The only difference in the second command is that we are telling curl to send back the cookies found in /tmp/cookie using the “-b” option. We also indicate that the file specified after the “-T” option should be sent using an http PUT. For this to work, be sure that the host parameter has a trailing slash (i.e. http://host.com/ instead of http://host.com).

Note to self:

To get the wireless (AR5212) working on a T60:

  1. Compile madwifi from source (don’t bother with the openSUSE 11 repo)
  2. Add the following to /etc/modprobe.conf.local:

blacklist ath5k
install ath_pci /sbin/modprobe –ignore-install ath_pci; /usr/sbin/iwpriv ath0 mode 3
options ath_pci autocreate=sta
alias ath0 ath_pci

This post is just a place for me to keep track of the tweaks necessary for installing SLED10 SP2 on a Thinkpad T60.

I just thought I’d post this info here because this application is listed on http://www.winehq.org as broken.

To get Lotus Notes 7.0.3 (or 8.0 Basic) working under wine in Linux (using opensuse 10.3 here), perform the following:

Download wine-0.9.19 from sourceforge here. The link is for suse rpms, but other packages are available from WineHQ Downloads.

Remove any existing versions of wine and install version 0.9.19:

rpm -e wine

rpm -ivh wine-0.9.19-SuSELinux100.i586.rpm

Install Lotus Notes (replacing the executable name with your own):

wine BasicClient.exe

After the setup completes, copy the following .dll’s from a windows machine and place them in ~/.wine/drive_c/windows/system32:

  • oleacc.dll
  • oleaccrc.dll

Using winecfg, setup a library override for oleacc:

winecfg

Click “Applications”

Click “Add application”

Browse to “drive_c\Program Files\lotus\notes\nlnotes.exe” and click “Open”

Change “Windows Version” to “Windows XP”

Click “Libraries”

Select “oleacc” from the dropdown and hit “OK”

You can now execute Lotus Notes by using the following command line:

wine “C:\\Program Files\\lotus\\notes\\nlnotes.exe”

Once you’ve verified that it works ok, you can safely upgrade to wine-0.9.56.

Hope this helps somebody out there.