I often find myself creating a Outlook contact from the signature in an email or some text in a work document. Rather than do it by hand each time, I have put together a few vba commands and a new vba class to parse the text on the clipboard and create a new contact from what it gathers.
To set it up, in ThisOutlookSession add:
Public Sub ParseClipboard()
Dim Selection As DataObject
Dim SelectionStr As String
Set Selection = New DataObject
Selection.GetFromClipboard
SelectionStr = Selection.GetText
CreateAddrFromStr SelectionStr
End Sub
Getting Perl/Tk running under cygwin seems to be a constant pain. Until the recent perl release which went to a site/5.8 directory for modules, this was something that I went through every time I upgraded perl. I think I found the secret though. Apparently they dropped cygwin support in Tk804. You need to get Tk800.025 from cpan. Make test still reports a few errors, but the installation works for me.
This is gerat! A website with a java applet that you can use to open an ssh connection in a web browser. I guess you need to be a bit trusting to use it, but it is put out there by osu.edu and is open source, so I assume someone has looked at the source.
In followup to the not about how to create a local cpan repository, I figured out how to get cpanplus to use this respository. Not nearly as simple as with cpan, but once it is setup, it is a breeze. The following script does all the work.
Found a nice module/script to keep a local copy of the cpan repository for those times when we aren’t connected to the internet.
Used cpanp to get CPAN::Mini
minicpan -r ftp://ftp.ibiblio.org/pub/languages/perl/CPAN/ -l CPAN/
From cpan use this to add the local repository. (This is a pain to do with cpanplus
o conf urllist unshift file:///home/mgrimes/CPAN/
PerlMagick is another one I always struggle to install under cygwin. I have gotten it to work under cygwin 1.15.18-1. First, don’t use the ImageMagick package distributed with cygwin. Get version 5.5.7 binary, cygwin distribution originally from www.imagemagick.org but since they have moved to version 6.
Install ImageMagick into /usr/local
with the following commands:
$ cd /tmp
$ tar -xvzf ImageMagick-i686-pc-cygwin.tar.gz
$ cd ImageMagick-5.5.7
$ tar -cvzf install.tgz *
$ cd /usr/local
$ tar -xvzf /tmp/ImageMagick-5.5.7/install.tgz
$ rm -rf /tmp/ImageMagick-5.5.7
Found a very interesting tool to do lossless rotation and EXIF editing of JPEG files. Checkout jpegtran. This version is apparently a patched version of the JPEG software from IJG.
jpegtran -copy all -rotate 90 1.jpg
There is also a related tool, jhead, which can pull all sorts of interesting stuff out of JPEGs. This will extract a thumbnail which most cameras already embedded in photos:
jhead -st "thumbnails &i" *.jpg
And finally, another tool and script which can auto-magically rotate files based on the orientation info in the header.
Well I haven’t completely got it working, but it is darn close. I ended up switching to WxWidgets, which will work with some coaxing. Most of this kludge is based on bug reports from Marc Lehmann. Thanks Marc!
First off, we need to create a list of all the Gtk2 files that aren’t picked up
automatically by pp
. I use this script to create the list and run
pp
. Note that I am running the script under cygwin, but I want to
use the ActiveState Perl to run pp
so we end up with a native
Windows app. (BTW, I tried our Strawberry Perl, but it had issues with some of
the dependencies due to a lack of pkgconfig.)
As is typical with installing anything in cygwin, CRM114 took some tweaking to get it to install properly. The CRM114 Discriminator is a “Controllable Regex Mutilator” according to their website. In engilish it is an complex and interesting tool to “examine incoming e-mail, system log streams, data files or other data streams, and to sort, filter, or alter the incoming files or data streams according to the user’s wildest desires.” Mostly it is used to sort spam.
Anyway, here is what I needed to do to install crm114 under cygwin. I used
the 20040231-BlameYokohama version of CRM114. First, get the libiconv,
gettext
and procmail
from cygwin. Then get the Mew
from www.Mew.org (I used version 3.3.) Install
mew-3.3 with cd bin && ./configure && make && make install
. This will
give you mewdecode
and mewencode
. From the CRM114 package cd into tre
directory and install with ./configure && make && make install
. Now, back in
the main CRM114 dir, edit the Makefile to add the following lines somewhere
after the initial definitions.
CFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
LIBS += -lintl -liconv
rsync
is a very powerful tool, but not always the most intuitive.
Here is a Perl script that I use to
backup all of my relevant files (under both Linux and Cygwin) to a remote
backup machine. All that is needed is ssh, rsync and perl.