Site update

After a long while I finally got around to updating to drupal 7 (initially 7.8).

At the same time - I migrated from mysql to postgresql.

Not everything is complete. I haven't looked at the image config yet for example.

So - things might not work 100% as expected just yet ;)

Finding the current system JAVA_HOME on mac osx 10.5+

I always forget where this file is located - so just as a reminder ;)

To find the current JAVA_HOME for the current user (set by java preferences) run:

/usr/libexec/java_home

Details from http://developer.apple.com/library/mac/#qa/qa1170/_index.html

Technical:

Postgres monitoring with munin 1.4 and multiple databases

In munin 1.4 the number of plugins for postgres has increased. They are all based on the same perl module - Munin::Plugin::Pgsql

Many of them allow for suffixing the database name to the symlink in /etc/munin/plugins/ to run against a given db or to suffix ALL to run against all (this is standard munin behaviour - see the plugins that have a filename ending in _).

If you enable several databases on the same plugin - it does a lot of stuff to be specific but it wasn't changing the plugin title so all the graphs generated got the same title. Hard to know which db is which.

I found that if I insert this line

$pg->{title} = $pg->{title} . " " . $pg->wildcard_parameter();

just before the call to

$pg->Process();

then I get unique titles.

Not sure if this is handled in later versions (I am running this via the lenny-backports apt repo).

Technical:

Splitting MKV files on chapter marks

I had the need to split some mkv (matroska video) files on chapter marks.

I'd normally use handbrake for this - split and encode. But I didn't really want to reencode each time.

Downloaded mkvtoolsnix (machomebrew: brew install mkvtoolsnix).

Most tutorials concentrate on mkvmerge gui which I didn't have - just the command line

So - an example:

JavaZone for iPhone/iPad - some stats

Just been looking at the usage of the iPhone/iPad app for this year's JavaZone for the actual conference days.

  • Yesterday (day 1) we had 820 users
  • Today (day 2) we had 716
  • Over the two days - the app was started 25631 times
  • Unhandled errors causing a full application crash (unable to write to database, some other unexpected state etc) - 6 times.

Sessions divided by model:

Update OpenDS 2.2.0 to OpenDJ 2.4.3

Finally got around to upgrading my OpenDS 2.2.0 to OpenDJ 2.4.3.

Clean upgrade - just followed the OpenDJ wiki.

Only change I had to make was from

./bin/rebuild-index -i dn2id -b "dc=example,dc=com"

to

./bin/rebuild-index --rebuildAll -b "dc=example,dc=com"

Rebuilding the dn2id index only left the sync-conflict index for my root backend in degraded mode.

Technical:

Update OpenDS 2.2.0 to OpenDJ 2.4.3

Finally got around to upgrading my OpenDS 2.2.0 to OpenDJ 2.4.3.

Clean upgrade - just followed https://wikis.forgerock.org/confluence/display/OPENDJ/OpenDJ+Installatio...

Only change I had to make was from

./bin/rebuild-index -i dn2id -b "dc=example,dc=com"

to

./bin/rebuild-index --rebuildAll -b "dc=example,dc=com"

Technical:

Running rvm ruby 1.9.2 with rvm packages on OSX Lion - failing to make due to readline

Getting rvm rubies to compile with the rvm packages isn't turning out that easy.

First off - you need to get XCode for Lion installed from the App Store (even if you upgraded from Snow Leopard - Lion needs a newer version). In addition - the App Store downloads an XCode installer - you also have to run it to get it installed ;)

So I grabbed the latest rvm:

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

This puts up the following message:

Git attributes and diffing binary files

Came across this on Pro Git 7.2 Customizing Git Git Attributes

You can use git attributes to allow for customized diff of binary files.

My current additions to my global git config are

git config --global diff.strings.textconv strings
git config --global diff.exif.textconv exiftool

Then in projects (either .gitattributes or .git/info/attributes depending on whether you want it checked in or not):

*. diff = 

For example

Google IMAP giving incorrect password when password is correct in Mac OSX Mail.app

Since installing Lion and running two machines in parallel - Lion and Snow Leopard I was getting errors connecting to gmail/google apps IMAP - it kept throwing an incorrect password error.

Finally found this FAQ:

https://mail.google.com/support/bin/static.py?page=known_issues.cs&ki_to...

If you're having this issue - might be worth hitting the FAQ while logged in and hitting the Report button.

E-mail validation and Blizzard beta profiles - SystemCheck does not like a plus sign in your e-mail address

I've been annoyed about this for a long time. Forms that simply reject e-mail addresses with a + in them (perfectly valid according to the standards/RFC's - see http://www.faqs.org/rfcs/rfc2822.html 3.2.4 Atom - definition of atext).

Well - we need to add systems that allow you to set a valid e-mail with a + in but then fail.

I finally managed to register my systems profile using Blizzard's battle.net SystemCheck.

I've been trying to do this for a few years - without success - even with help from Blizzard support.

Store iMovie events on a network drive/NAS

I'd found a lot of info on the net about using symlinks to allow iMovie to see network disks, but this always seemed like too much of an effort.

So this blog post was a real nice find.

Short form - you just need to set a default:

defaults write -app iMovie allowNV -bool true

Syncing secondary google apps calendars to iPhone

Setting up calendars to sync from google apps to iOS turned out to be harder than I expected.

I had already set up a gmail iOS mail/cal/contacts account on the iPhone. But that only gets the primary calendar.

Read on to find out how I finally got my secondary calendars onto my iPhone.

bash helper function for rvm gemsets

By convention I use an rvm gemset per project - named after the directory that the project lives in.

For example src/rails/foo would have gemset foo

Since I switch a lot between machines - I always end up having to go check if the gemset exists and create it if not.

A small bash function (dump it in .bash_profile) and then when in the projects home dir you can just run rvmgo (or if you want a different ruby then e.g. rvmgo 1.8.7) and it will switch to the correct version/gemset creating the gemset if needed.

Note - it will not install a missing ruby.

Technical:

Mac homebrew and homebrew-alt

Updating mac homebrew from 0.7.1 to 0.8 removed the rsync formula that I use to update mac rsync from the supplied 2.x version to 3.x.

This is due to the fact that homebrew doesn't want duplicates of existing software.

However - these are still available via homebrew-alt

For example - to regain the rsync formula was as simple as:

brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/rsync.rb

A + in an e-mail is valid. Can't we stop using validators that don't follow the standard?

This is something that has long irritated. Websites that use form validation or similar that rejects e-mail with a + sign in the left part.

Background

Why would you want to? Well - quite a lot of e-mail servers (including gmail - which we'll use for examples here) take:

Technical:

Scroll wheel in debian guest after updating virtualbox from 3.x to 4.x

After update from virtualbox 3.x to 4.x the scroll wheel of my mouse stopped working - just behaved as a three button mouse.

Newer versions of debian no longer have an xorg.conf file - since it's not normally needed.

After some searching I found that it has a config loading directory /usr/share/X11/xorg.conf.d/ and virtualbox had added a 50-vboxmouse.conf there.

I changed this file from

Prevent iPhoto '11 from asking for your e-mail password

iPhoto '11 from iLife '11 has a new set of e-mail templates for sending photos directly from the application.

However - each time it prompts for your e-mail password and doesn't seem to have a "remember" option.

To fix - open Keychain Access (/Applications/Utilities).

Select login (your login keychain) from the top left Keychains list and Passwords from the lower left (Category) list.

Munin - node with no services

Note to self - when munin shows no services for a node yet all testing (telnet to 4949 from the munin server to the node) etc show OK - check you've spelt the nodename correctly and use the host_name value in the node's munin-node.conf if you need to override it on the node.

Technical:

Adding hosts to /etc/hosts on Leopard/Snow Leopard

Adding hosts to /etc/hosts on Leopard/Snow Leopard is a little simpler than earlier versions (see /etc/hosts on Mac OS X)

  • Edit /private/etc/hosts1
  • Run dscacheutil -flushcache

  1. Since /etc is symlinked from /private/etc /private/etc/hosts is the same file as /etc/hosts 

Technical:

Tunnelling IPv6 from a mac over IPv4 tunnel through a debian firewall using tunnelbroker.net

There are three steps to this:

  1. Tunnel configuration
  2. Firewall configuration
  3. Client configuration

Tunnel configuration

Sign up for an account at http://tunnelbroker.net

Once signed up - choose "Create Regular Tunnel"

Enter the IPv4 address of the external interface of your firewall. Note - this must be able to receive and respond to ping from arc.he.net - the webpage will give you an IP address to allow ping for if it can't ping your firewall.

Java Apps banned from new mac app store

A follow up on Java deprecated on Mac OS X?

From a response in this thread we can read:

Apps that use deprecated or optionally installed technologies (e.g., Java, [PowerPC code requiring] Rosetta) will be rejected.

Technical:

Java deprecated on Mac OS X?

There's an interesting paragraph in the latest Mac OS X Java update relasenotes New and Noteworthy - a paragraph called "Java Deprecation".1

As of the release of Java for Mac OS X 10.6 Update 3, the version of Java that is ported by Apple, and that ships with Mac OS X, is deprecated.

Technical:

Nexus repository manager with LDAP users

I wanted to use LDAP to give access to the nexus repository manager from sonatype for those users who need more access than just browsing.

Importing custom CA certificates to OSX

For my own sites I use SSL certificates signed by my own CA.

The CA certificate needs to be imported to the machines where I use the websites and for Mac OSX it needs to go into the system keychain - not the users keychain.

Importing via Keychain Access sometimes fails with cryptic error codes.

Here's how to do it via the command line:

sudo security import  -k /Library/Keychains/System.keychain

Technical:

javaBin/JavaZone video stream - subscribe as video podcast in iTunes

The JavaZone 2010 videos have been released and are available on http://streaming.java.no.

If you want to add them to iTunes - they're not available in the iTunes store - but you can add them easily by hand.

Grab the feed URL (http://streaming.java.no/tcs/rss.php) - head to iTunes, and choose advanced > subscribe to podcast and paste the feed in. Simple ;)

JavaZone iPhone app available

My first iPhone app - for JavaZone 2010 is now available via the app store.

JavaZone 2010 runs from 8th-9th September 2010 in the Oslo Spektrum.

This app provides access to the agenda for JavaZone and allows the user to mark sessions as favourites which can then be viewed separately (this can be used e.g. as My Programme or similar).

Flexus follow up

I was down at Trafikanten today to discuss Flexus ticket payment - money taken but no ticket :(

Apparently - I was the third person that day with this issue. Not exactly reassuring.

That said - the system is apparently clever enough that it can notice within a day or so a payment that it can't relate back to a ticket on a card, and will pay it back automatically. So - I should see it back in the next day - if not - I have a form to send in to claim it.

Technical:

Flexus ticket payment - money taken but no ticket :(

Tried to load a new month card onto my flexus card this morning. The ticket machine at Blindern was "Not in use" - but the one at Forskningsparken was active.

Insert flexus card - order a month card - adult price - pay by card.

Swipe the bank card and enter PIN - payment terminal says "Godkjent" (approved).

Ticket machine says "Betaling avvist" (payment refused).

Nothing Trafikanten can do until the payment goes from an anonymous reservation on my account to an actual transaction - and it's going to take another visit to Trafikanten in the centre of town too.

Technical:

Pages

Subscribe to Chris Searle RSS