Subtitle Script for I to l Converstions

Posted by John 30 Nov 2009 at 18:45

A quick script to change a capital I (eye) in the middle of a word into a lowercase l (el). If you like Asian films, you understand why I wrote this script. I had an itch. It needed to be scratched. This is useful for .srt files used in movie subtites.

#!/usr/bin/perl
# Perl script to change every 'I' into an 'l' in the middle of a word
# input is stdin and output is to stdout; redirection is your friend
my $line;
while(<>){
 chomp;
 $line=$_;
 $_=$line;
# Match lines with non-whitespace characters leading a capital I 
  if ( m/[\S]I/ ){
     $line =~ tr/I/l/;
  }
  print "$line\n";
}

It is very common for subtitle files, SRT format, to have a capital I in the middle of words since bitmap patterns are used to create the files. For native speakers of English, this is HIGHLY distracting – to the point that the subtitles must be fixed before a movie can be enjoyed.

I tried a few other methods, before determining this simple character translation was needed.

  1. ispell – There were too many words that were not in the dictionary and spacing of words often groups them in strange ways.
  2. replacement dictionary – I created a hundred word dictionary replacement sed script. There were always new words that needed to be added for every SRT file.
  3. Manual editing – yep, I spent a few hours manually editing files. This wasn’t very efficient and ruined the movie plot since I’d already read it before viewing it.

Some combination of methods will probably be necessary. I intend to merge them into a single perl script and perform them in the most efficient order. It will begin with the I—>l translation.

Curry Chicken Success 1

Posted by John 21 Nov 2009 at 07:15

I’m easily amused. You know that by now.

In a quest for great homemade curry recipes without too much difficulty, I’ve tried a few. Yesterday, I found the best mix.

The key was the curry – Kitchens of India is imported from, er, India. It is a curry paste and comes in a sealed foil package. A 6 pack runs $12 from amazon – ouch. It is worth it.

Follow the last curry chicken crock pot recipe I posted here, just use the Kitchens of India curry instead. Here’s the result


Yum.

Solved - Adito 0.9.1 Installation Woes 1

Posted by John 20 Nov 2009 at 16:26

So, Adito/VPN doesn’t really like Linux. The installation goes better than expected on 32-bit Linux, but if you change any of the configuration settings, then have the admin web page reset the server, the system won’t come back up. This happens on both 64-bit and 32-bit Ubuntu 8.04.x in my experience.

Initially, I installed Adito on a 64-bit Ubuntu Server, but problems with the startup scripts and/or wrapper, prevented it from working as far as I can tell. I never, never, never got the Adito to work after a reboot on 64-bit Linux. I ended up installing a 32-bit VM under ESXi 4 and loading Adito there. Comments below is for 32-bit Linux, since it was clear that the 64-bit startup scripts/wrapper was beyond my ability to solve.

Even on the32-bit Adito install, the system has never come back up after changing settings that require a reboot for me. NEVER without doing some extra work. After making any reboot-required changes, only the method outlined below has gotten a running Adito system again.

The Fix

I’ve tried a few methods (UTF-8 settings, hacked startup files, hacked config files, swapped versions of libwrapper crap), only the following has actually worked. As root:

  1. cd /opt/adito (or whatever directory you used)
  2. Delete the conf/webserver.properties
  3. ant install
  4. Login through the web interface at http://host:28080
  5. Step through the install process keeping all the defaults from before. Only the SSL certificate/key will need to be reinstalled.
  6. Reboot and all is well.

I’ve not lost userIDs or policies or tunnel settings doing this.

At some point, I’ll need to figure out how to backup just the settings and DB, without grabbing the entire server image.

What’s the issue?

I can only guess, but I believe it is too much of a mix of java and supporting java tools. According to the blueprint going forward, they plan to swap ant for some other tool and remove libwrapper. Ant is used by all java development teams, so I doubt that really is the issue. libwrapper appears to be a lazy way to set configurations for java web applications. There seem to be incompatible versions shipped with Adito as well. The startup process is overly complex too.

/etc/init.d/adito points to /opt/adito/install/platforms/linux/adito which is overly complex and reads a config file /opt/adito/conf/wrapper.conf which figures out which specific version of wrapper to call in /opt/adito/install/platforms/linux/x86-64/wrapper with the appropriate options (more than 3 options for some reason)

/opt/adito/conf/wrapper.conf is rewritten with every run of ant, which means any time you have to modify it to make it work (UTF-8 character sets), then any use of ant will overwrite those settings. CRAP. There are ways to reset everything with ant or just reset parts. The problem is these resets aren’t explicit in the build.xml file – they are implicit. More crap.

Anyway, the levels of indirection are too complex and just make something that should be

java /opt/adito/lib/adito.war

into something really complex. Yes, I know it isn’t that simple, but it should be. That’s the point.

Update a few weeks later

So we’ve been using the VPN for a few weeks and everything is working well. Performance is good. There are a few things lacking that we’d really like to have, but they are beyond our expertise. Since I’m protecting internal web sites, we didn’t want to leverage LDAP authentication. We really want RADIUS authentication with x.509 certificate exchange. That isn’t a built-in option, so I’ve force really, really long and complex passwords and don’t allow users to change their passwords to get into the VPN. Their LDAP passwords are still known only to them, it is just the VPN access which I demand use 60+ characters. I deliver the password to each of them in a KeePass database, further insisting they follow good password management and protection methods.

Deployment to the entire company happened a few months ago. We’ve had no issues and have placed all our applications behind this VPN.

Help Make This Data Better

As I review this post, I can see where it could be confusing. It isn’t particularly well written. Please let me know which parts are too confusing to be useful. Oddly, this is one of the most popular posts on this site.

ESXi 4 and Win7 Pro

Posted by John 19 Nov 2009 at 15:55

Last week, I setup and configured a special desktop for the accounting system for the company. Basically, it is a Windows7 Pro desktop running under ESXi 4 that the folks responsible for accounting remote (RDP) into after connecting via VPN to the special network for it. We’re small and only a few people even need access – never more than 1 at a time.

It was fairly painless to setup, install Accounting, load Payroll CD, then validate remote VPN access (which is never trivial), then setup daily backup jobs. Of course, AV, automatic patchs and nasty IE settings were configured too. Each daily backup set is about 250MB, which isn’t too bad, but more than I would have thought given the machine is idle most of the time and won’t be used more than 3 days a month. These backups are Microsoft VHD files using the built-in backup, which could be useful, but I’d rather have a complete VDMK, VDI, or Xen img file to restore.

Of course, it isn’t possible to connect to this VM without going through our VPN.

Next I need to perform a test restore to another machine under some virtualization tool that we use. Yeah, I know with the VHD, I can perform a restore someplace else, but with the VM-image file, I just point a hypervisor at it and go. Now that VirtualBox supports VMware, vdmk, files, this test really should be trivial. If it goes well, I’ll take my WinXP (MS-Office, Visio and other WinXP-only tools VM) and put it under a server-based VM too. It will be better to not travel with that stuff on my laptop anyway.

Linux and the Maytag Repairman

Posted by John 16 Nov 2009 at 11:41

Linux compared to the Maytag Repairman

In summary, IT consultants don’t deploy Linux because deploying Windows gets them more customers and repeat business. Windows requires more IT support than Linux.

If you are a Linux consultant, you must have many more clients to make a living, which means more effort acquiring the clients.

With Linux systems, once they are deployed, they just work and continue to work. For many systems, even patches are handled automatically with no need for onsite support. The only reason to call your Linux consultant is to upgrade a system to a new release OR for a hardware failure.

I don’t know whether any of these statements are completely true, but there is some fact in each of them.

Survey of Typical Breakfasts

Posted by John 16 Nov 2009 at 09:40

Breakfasts around the world vary greatly in my limited experience. There are differences based on eating at home, eating out, eating with friends and on holidays, in my experience. Obviously, everyone eats just a little differently at breakfast based on family, culture, and available foods in season.

American

I’m American and have lived all over the USA. I’ve found there are regional differences based on family location. Southern families might have grits with their breakfast and norther families might have oatmeal. I’ve had both, but tend towards my norther family/culture a dozen times a year or so. Most of the time breakfast at home is much simpler.

I’d guess over 30% of Americans just have something to drink for breakfast whether it is coffee of milk or juice.

Children

Cereal plus whatever else Mother can get them to eat and drink. Milk and juice and fruit, but only if cut up and put on cereal. The cereal usually has tons of sugar – Captain Crunch was my favorite as a child, but Cocoa Krispies and Life were fine. The bowl was always more than 1 cup, usually 2-3 cups. Raisin Bran became a staple after age 16 thru to my mid-30s.

Healthier Adult

Coffee, juice, some kind of fruit and a fairly small bowl of grainy cereal.
An alternative is tea/coffee, fruit, and some protein like an egg / bacon / sausage. I’m a protein, fruit, tea guy.

Special Occasions

When out with family or friends, going to a restaurant for breakfast usually means a waffle/pancake, eggs, and sausage/bacon ordeal. I usually get an omelet with almost every type of veggie and ham.

For holidays, my family has old German recipes that mix eggs, bacon, bread, and cheese all together and bake it. The sodium level will give anyone a heart attack, but it is sooooo good. About once a year, I’ll make gooey cinnamon rolls. There are also the odd times when donuts are purchased.

Japanese

I’ve heard the normal Japanese breakfast is a raw egg over a small, cold bowl of rice with green tea. I’ve tried this and found it unsatisfying. I suspect the Egg McMuffin is popular in Tokyo.

Chinese

On multiple occasions while in China, I’ve eaten breakfast out with the locals. Cantonese breakfast tends to be a hearty bowl of soup with veggies and meat. Of course, a western-style breakfast is available too, but 80% of the diners that I saw were having that big bowl of soup. Even the American chain, KFC, sells the potato + sausage soup in China. Further, it is really tasty.

Of course, if you go to a place known for dim sum, you’ll see that instead. It is definitely popular with a huge list of options on the ordering pad you will be provided with. Just check the boxes and enter the number you’d like for each available type. Ask for the English menu if it isn’t automatically provided.

Central American

Varied just like in America – French toast some days, but there’s always, always fresh fruit – papaya, cantaloupe, banana, and varied juices with coffee. Hash brown potatoes or other locally fried starches (banana) were also provided a few times. I’ve never eaten so much and so many varied fruits in a single meal, yet it probably had only 200 calories.

Metro-South American

Coffee and a small scone. I don’t know if this is typical, but while in BsAs for a few weeks, every corner had a coffee cafe that provides this. Seeing a Starbucks here is odd since the locals have known excellent coffee for their entire lives and laugh at people going to Starbucks. Starbucks is losing money, big time.

The oddest thing I found here was that carbonated water was often provided with coffee. Agua con gas or agua sin gas_. Interesting. Argentina has some specialized menus that make ordering breakfast a challenge.menus I guess the good news is that you were probably out until 3-4am drinking after eating dinner around 11pm, so breakfast isn’t really that important.

French

Coffee and croissant. My experience was on my first trip to Tokyo while spending a few weeks in a French hotel. The first week there, the company CEO and I met for breakfast in the main lobby and he loved it. On subsequent trips I stayed in the same hotel, but discovered a different breakfast was available downstairs for the same cost – about US$23. Good thing the client was paying for everything.

British

I’ve never been to Britain, but I have seen their influence in China and Japan. Thank GOD for the Brits, or I would have starved in Japan. A proper British breakfast was provided in every hotel I’ve stayed at in either place. It was usually buffet style with bangers, bacon, eggs (3 styles), fruit, and pastries.

Eating Bangers and Mash for breakfast in Hong Kong Central while watching an American Football Superbowl at 7am is a trip highlight that I’ll never forget. Since football was on TV and the expat pub, Bulldogs, was full of Americans (overflowing), Budweiser and Coors beer was available too, but paying import prices for bad beer doesn’t make sense when Carlsberg is available cheap.

Away from Home

When I’m away from home, I tend to relish in the differences and take a little of the best things back home. These turn into habits. Breakfast was some of the best experiences that I’ve had every where in the world.

Whether in an MTR station Le Madelene’s in Kowloon eating sausage soup with veggies or on Macau Island having 20 different dim sum portions or a simple home made French toast in a mountain-side home in the Monteverde Rain Forest or a CafĂ© Doblo con leche in a Buenos Aires corner Cafe, any of these experiences beats standing in my kitchen chowing on a hard boiled egg and banana as I wait for coffee or tea to steep.

When away from home, breakfast is usually a meal you can find something tasty, yet local, that will get you going for the rest of the busy day. Breakfast doesn’t usually come with the unusual-to-me or you want me to eat what concerns either.

What have been your experiences with breakfast around the world?

Geany A Lightweight IDE and Code Editor

Posted by John 12 Nov 2009 at 07:37

Part of me has wished I had a fancy IDE like visual studio provides, but without the commercial license and heavy system resources. I usually find vim to be enough syntax highlighting and it is definitely light weight. Occasionally, jEdit or Notepad++ seems like the best compromise between small, fast and features.

This morning I found Geany. It feels like emacs without the memory requirements. It has tabbed files and function indexes. The view for each function or code block can be compressed/hidden easily.Geany Screenshot

Best of all, it doesn’t depend on either Gnome or KDE toolkits, so it doesn’t force specific desktop environment libraries to be loaded, reducing RAM requirements for half of us that use the othe OE.

I hope my fellow Linux users find this code editor – mini-IDE useful.

GeoCaching and N800 GPS Woes 1

Posted by John 08 Nov 2009 at 08:36

On Saturday, I went GeoCaching with an expert Geocacher (over 1000 caches found and logged). We went to a trail that I’ve hiked twice before, so I knew the terrain and was prepared for the effort required. At least I thought I was prepared. It turned out, I was not.

Equipment

I have a Nokia N800 that gets tethered via Bluetooth to a GoPass GPT800 Bluetooth GPS Receiver SiRF Star III. At the time of purchase, this was a highly regarded GPS receiver chip.

My sister had a hiking-specific GPS unit from Garman with a big antenna. I don’t know the exact model, but think it is a metal grey color with black and white screen. No color, since that uses too much energy.

My brother-in-law uses a few applications and scripts that he wrote to grab GPS point data for any geocaches near where we are planning to be. His scripts also grab hints and comments from other enthusiasts.

The Issues

So, we’re hiking on the path and we both have waypoints/POIs entered into our units marking the cache locations. I keep walking on the path, then my sister heads off into the brush. Not just a few feet off the path, but out of voice yelling range. We both have whistles, which is good hiking practice. My GPS was still telling me to continue on the path. She found it. I didn’t realize the cache locations wouldn’t be fairly near a trail. Since I’d already hiked these trails with my GPS tracking enabled, I had that prior track loaded into my map and could see approximately where the best place to take off into the bush would be.

GPS units appear to be designed for movement, somewhere around 10mph or faster seems ideal. I can’t walk that fast. When we stopped to get readings, mine jumped around a lot – hundreds of yards. Further, if the GPS signal gets lost due to trees, hills, whatever, then mine takes you back to a previous location as an initial guess. With tracking enabled, the map gets really busy with a pseudo-star pattern of lines.

Cockpit Error – i.e. user error ;)

On about the 3rd cache, I realized that the built-in compass for the GPS software wasn’t really working the way I thought. Fortunately, the same tool that my whistle is on has a compass, signal mirror, magnifying lens, thermometer and an LED flashlight 6-in-1 Compass Tool. It is a really handy little plastic tool for hikers to have. I don’t mind that it is cheap, it does work. The compass was more than accurate enough for my needs, but sadly, the GPS location was still off. My sister kept making a beeline to the caches and found almost all of them in this area.

Final Result

I’ve decided that geocaching with my current setup isn’t fun. I get frustrated when technology doesn’t work as expected. To resolve the issue, wiping the original OS2008 included with the N800 will be needed. I’ve been unable to update the GPS mapping tool software since it was loaded due to some underlying libraries that couldn’t be updated too. A fresh OS install with the newer release will be good and get me out of Application Manager hell. Maemo 5, here I come. Then I’ll re-visit the same location and see whether the new software helps with the accuracy of the GPS. Knowing where some of the caches are located, will be helpful.

If this doesn’t work, perhaps it is time for a new bluetooth GPS receiver. The current receiver is really good for driving – seriously, so that $35 was well spent.

Manage Your Google Data

Posted by John 06 Nov 2009 at 08:50

You can manage your google data here https://www.google.com/dashboard/. This is good. I don’t really use all the google apps, but seeing all the searches I’ve made over the last few years and the trend data, was eye opening. I elected to wipe my data, then pause all future capture of that data.

What other data did the dashboard show? I have removed anything personally identifying below.

Account
Name: xxxxxxx
Nickname: xxxx
Email addresses: xxxxxxx@gmail.com, yyyyyy@yyyyyyyy.yyy
Requesting data for Account...
Manage account
Edit personal information
Privacy and security help
Calendar
Country United States
Time zone (GMT-05:00) Eastern Time
Requesting data for Calendar...
Manage calendars
Manage mobile devices
Calendar privacy policy
Contacts
Contacts 58 entries
Requesting data for Contacts...
Manage contacts
Docs
Owned by me 1 document
Most recent: Weight 2008 on Jun 6, 2006
Opened by me 1 document
Most recent: Weight 2008 on Jun 6, 2006
Starred 1 document
Most recent: Weight 2008 on Jun 6, 2006
Requesting data for Docs...
Manage documents
Sharing documents
Finance
11 securities in 1 portfolio:
My Portfolio 11 securities
Portfolio value: $0.00 at Nov 6, 2009
Requesting data for Finance...
Manage portfolios
Gmail
Inbox 11 conversations
Most recent: TTTTTTTTTTTTTTTTTTTTTTTT at 7:42 AM
All mail 40 conversations
Most recent: TTTTTTTTTTTTTTTTTTTTTTTT  at 7:42 AM
Sent mail 7 conversations
Most recent: gmail test on Oct 11, 2009
Spam 2 conversations
Most recent: Ref: ssssssssssssssss on Oct 30, 2009
Trash 25 conversations
Most recent: New private message has arrived on Oct 18, 2009
Requesting data for Gmail...
Manage chat history
Manage HTTPS settings
Manage all Gmail settings
Gmail privacy policy
Privacy and security help
IGoogle
Gadgets installed 10 gadgets
Most recent: on Jan 24, 2008
Tabs 1 tab
Most recently added:
Requesting data for IGoogle...
Manage iGoogle settings
iGoogle privacy policy
Profile
About me 2 entries
Name: xxxxx xxxxxx
Profile URL: http://www.google.com/profiles/pppppppppppppppppppppp
Requesting data for Profile...
Edit profile
Manage sharing of contact info
About access and privacy of profiles
Talk
Contacts 1 contact
Sample Contact: zzzzzz@gmail.com
Requesting data for Talk...
About talk
Talk privacy policy
Voice
History 140 calls
Placed calls 4 calls
Trash 36 items
Forwarding phones 2 phones
Requesting data for Voice...
Manage Greetings
Manage Google Voice settings
About privacy and security in Google Voice
How voicemails are transcribed
Web History
Web History: Disabled
Requesting data for Web History...
Remove items or clear Web History
Web History help
Web History privacy policy
Web History privacy FAQ
Other products
Google Maps

There was a list of 3rd party sites with access to this data too. I didn’t recall authorizing any of them. Data removed and future 3rd party access prevented.

Major kudos to google for allowing us to manage our data and privacy settings.

I did leave some of the private data out there for use. It isn’t important to me. Your internet use may tell others things that are better not shared. Suppose you search on a medical term because a friend tells you a story about his mother. That search term is saved and tied to your account. What happens if 5 yrs later you end up being medically diagnosed with that illness? Your insurance company may start legal discovery efforts, or just pay google for the data. Now they refuse to cover your treatment since it was a pre-existing condition. Even if you don’t care about this, you know someone who does. What if you search for foods that are bad for you or visit weight loss web sites for 5 years? Expect your insurance company and the govt to have access to this data. If it is stored, it will get out.

It should be noted that if you aren’t logged into your google account, the data captured doesn’t appear to be correlated with your account. That doesn’t mean it isn’t captured by your IP address or a google cookie, stored, and correlated. Further, you can’t manage the data with the dashboard. Google writes about this other data

Today, google is a little less evil. Until they let me remove my data from other peoples’ accounts (contacts, phone calls, email addresses), I’ll still avoid using google with an expectation of privacy.

11/8: The Washington Post Security Fix guy has an article on this now too.

VMware All-Day Event Today

Posted by John 05 Nov 2009 at 08:00

I’m off to the VMware event in a few minutes. It is probably more of the same. I did hear from a coworker that a 17 server VMware migration went well last night. I had nothing to do with it.

Look for me at the Georgia World Congress Center today. I’ll be wearing a dull green windbreaker if it is chilly.

If I learn something ground breaking, I’ll create a new post. Sadly, it will probably be more of the send us money and send NetApp money all-day-adware.