Monday, November 21, 2011

Mozilla Firefox History Reports

I've used FoxAnalysis for history reporting on Firefox in the past but it runs very, very slowly. I found a much faster way to do it by using the information on http://www.makeuseof.com/answers/save-print-firefox-history-including-time-date-information-mac/ . It works perfectly. I use the modified version of the SQL statement that is below to limit the date range, set an alias for the datetime column and limit the date range.

SELECT datetime(moz_historyvisits.visit_date/1000000,'unixepoch','localtime') as date, moz_places.url, moz_places.title
FROM moz_places, moz_historyvisits
WHERE moz_places.id = moz_historyvisits.place_id and date>'2011-11-13' and date<'2011-11-19' order by date

Sunday, September 25, 2011

Converting Fan Fiction Into Epubs

I am an avid reader. Most of the reading I do is in Science Fiction genre. Recently I revisited a great site called Fan Fiction ( http://www.fanfiction.net ). Everyday people that are fans of various shows write stories with their favorite characters in them and upload their stories to the Fan Fiction site for sharing with other fans. The area I really enjoy is the tv shows->crossover section. It reminds me of the What If? comic book series. With the stories, you can find out the answers to questions like 'What if Dr. Who met the SG-1 team from Stargate:SG-1?'. Excellent stuff.
You can read the articles online from the fanfiction.net site or if you have an ereader, do what I have started doing - download the stories as an epub file for an ereader. This makes it much easier to read on the road. To facilitate this, check out an excellent project hosted at http://fanfictionloader.appspot.com/ . Just place a link to your story and click the Download button. A short while later you will be able to download your epub from the same page. Excellent!

Wednesday, September 14, 2011

Mapping Samba Share on OSX

Reference: http://www.mac-forums.com/forums/os-x-operating-system/85454-login-script-mount-smb-drive-desktop.html#post532690

The new Lion 10.7.1 seems to have an issue with reconnection with saved credentials to a Samba share. It wants to try as the logged in user's name and not the saved credential username. Here is one workaround. Create a text file in the users /Users/username directory and call it 'smbmount.command'. Put the following in it (modifying the appropriate variables).

Quick and Dirty Server Monitoring with Python

Sometimes you just need a quick and dirty script for monitoring servers to see if they are up. I wrote the following python script and have it running from cron so that it will notify me via SMS when a server's service isn't responding. The list of hosts is in a python dictionary with the key being the hostname or ip to monitor and the value being a list of service ports to check. If a host/port doesn't respond, it emails to the Sprint messaging service which appears on my phone. Any provider that has an email to SMS gateway should work. It isn't anywhere near a full fledged monitoring system but works well enough.

Wednesday, September 7, 2011

GroupWise and iPhone IMAP Server Not Responding Error

Recently an iPhone user with an IMAP account setup for GroupWise suddenly had their email stop working with an error message saying 'the mail server mail.domain.com is not responding'. Since no one else was having problems, the issue had to lie with their phone. I first verified their account settings. When that appeared ok, I removed the account and re-added it (this is IMAP so nothing would be lost). When that didn't work, I logged into their account and immediately saw the issue. They had moved their 'Mailbox' folder underneath another folder. For IMAP to work, the Mailbox folder must be at the root of the user's folder hierarchy. Moving it back immediately allowed IMAP to work. I've hit this before and am sure that will be the first thing I check from now on...

Wednesday, August 31, 2011

Little Known Feature of the GroupWise Client and Addressing

While composing an email in GroupWise, I started thinking about the best way to find one for the To: field. By default, as you start typing GroupWise auto-completes with the first matching address from your Name Completion Search Order preferences. The problem is that if you aren't sure of the spelling you need it is a hit or miss proposition. Most IDEs for programming have a nice auto-complete feature that gives you a list of options if you hit either Control-Enter or Control-Space. They show you a popup list of matching words to complete what you have already typed. On a lark, I hit Control-Enter and up popped a nice list of names that matched what I had already typed. It matched on the characters in the beginning First Name and Last Name fields. It does not match on characters that occur in the middle of the name parts. In the following pictures, I typed in 'te' and you will see what popped up when I hit Control-Enter. This makes it much easier to find an email from your address books than doing a search for it.

A full list of shortcuts can be found in the documentation - http://www.novell.com/documentation/gw8/gw8_userwin/data/b9ps9oq.html
Typing in 'te'

Results of Contact Search After Hitting Ctrl-Enter


Tuesday, August 30, 2011

Trimming video with ffmpeg

If you need to trim an mp4 video quickly without re-encoding the output, try this:

ffmpeg -i input.mp4 -ss <position> -t <duration> -vcodec copy -acodec copy output.mp4

-ss <position> is the starting time. It can be in seconds or in hh:mm:ss[.xxx] format.
-t <duration> is the length of the video to copy. It can also be in seconds or hh:mm:ss[.xxx] format.
 

Friday, August 19, 2011

Importing a Digicert Wildcard Certificate into eDirectory

The time to update my SSL certs has come around again. Based on positive reviews by Leo Laporte and Steve Gibson ( http://twit.tv/sn ), I decided to look into Digicert. Their wildcard certs really caught my eye. When you need to have ssl certs for apache, IM servers, spamfilters, and others, paying for each can get really expensive and a pain to manage. This go around, I decided to get the Digicert Wildcard SSL Certificate and import it into eDirectory.

There seems to be a lot of info in various places on how to do it. After combing through about 12 different pages, I settled on two different ones that seems to have worked just fine. The two pages in order of use are:
  1. http://www.novell.com/support/viewContent.do?externalId=3033173&sliceId=1
  2. http://support.novell.com/docs/Tids/Solutions/10098796.html
The first walks you through getting the cert from an external entity - the TID has Verisign but it works fine with Digicert. There were a couple of confusing spots.
  • In order, add the Location, State and Country attributes the subject line when creating the cert in eDirectory.  The resulting subject line will look like this:
CN=*.domain.com.O=organization name.L=city.S=state.C=COUNTRY

  • In step C3, it is the certificate that you get back from Digicert and not the one you created with iManager. It seems to me like it was asking for the one you created in the first steps.
  • Do check the box that states "Waive subject name in certificate" because Digicert does modify it.
Following the openssl TID worked perfectly for creating the Apache2 certs.

If you want to use the certificates with an eDirectory controlled app like GroupWise PO, then you need to keep the password protected version of the private key from step 7 of the 2nd TID and use it in the eDirectory configs. I tried to use one without a password but the GroupWise agents wouldn't load and complained about the use of no password (Warning - Failure in SSL startup (891D)).

I hope this helps someone else sometime :-)

Wednesday, August 17, 2011

Easy Document Searching With DocFetcher

Recently I had to search through about 50,000 files (assorted PDFs, text, Word and html) for specific strings for a report. At first I tried using Google Desktop and limiting the indexing to just the directory containing the files. Unfortunately Google Desktop kept crashing on me after the first couple of hours of indexing. So, off I go looking for alternatives. I came across DocFetcher and it looked perfect - open source, supports lots of file formats and is based on Lucene.

DocFetcher supports the following formats:

  • HTML and plain text (both customizable)
  • Portable Document Format (pdf)
  • Microsoft Office (doc, xls, ppt)
  • Microsoft Office 2007 (docx, xlsx, pptx)
  • OpenOffice.org Writer, Calc, Draw and Impress (odt, ods, odg, odp)
  • Rich Text Format (rtf)
  • AbiWord (abw, abw.gz, zabw)
  • Microsoft Compiled HTML Help (chm)
  • Microsoft Visio (vsd)
  • Scalable Vector Graphics (svg)
It has support for regex exclude lists which is very handy. Searching is super simple with the search field on the top of the interface and supports boolean and file type searches. One really nice featuer is that it was able to index all of the files I wanted indexed in under 2 hours - much faster than Google Desktop was doing before it crashed and it also didn't eat my processor for lunch. There is a portable version that runs on Windows and Linux. I really can't say enough good things about this program.

Tuesday, August 16, 2011

Easy SSH Connections From KDE

I was having issues with getting PAC to work (it would lock up my kdewin) so went looking for alternatives. After trying Remmina Remote Desktop Client (can't pass options to SSH), secpanel, and Easy SSH Connections widget (won't download and site is offline), I decided to just do it manually using KDE folders and icons. Here are the steps:

Create a directory somewhere in your home directory (I called mine '.SSH Connections'.

Inside the directory create a New->Link to Application. Set the following settings for the Command option in the Application tab:
konsole --new-tab -e ssh -X root@server.domain.com



This will open a new konsole window if one doesn't exist or a new tab if one does exist and start the SSH connection to the server. You can add your normal ssh options such as '-p xxxx' for port number and -C for compression.

Now that you have your icons for the connections, add a folder view widget to your desktop that points to the folder containing the SSH connections. Then drag the folder view up/down to your taskbar to have it create one icon that pops out to show all your ssh connections.




Simply clicking on the icon will drop down a list off SSH connections. Clicking on one of the connections either opens konsole and connects or puts it in a new tab on an existing konsole connection.