Playing With Wire The Internet Startup Blog 2011-07-20T18:45:29Z Viktor Petersson <![CDATA[This blog is more or less deprecated]]> 2011-05-21T10:42:17Z 2011-05-21T10:35:51Z As you probably have figured out by now, this blog is pretty much dead. We’ve had a lot of fun writing here, and we’ve received a lot of great coverage. For instance, we’ve been featured on Slashdot a few times along with a long list of other sites, such as Lifehacker.

That said, we don’t have much time anymore for blogging here at the moment, so we just wanted to write a note and let you guys know about that. Perhaps we will revive the blog in the future, but at the moment, we don’t have enough resources to allocate.

If you want to find out what we are up to, please visit WireLoad’s official website.

Viktor Petersson <![CDATA[The easy way to secure WordPress with SSL]]> 2010-05-09T21:58:16Z 2010-01-14T16:51:27Z It’s a good secure practice to force SSL on the the Admin back-end and the login-page in WordPress. I’m hardly the first one to point this out. There’s even an entire page over at WordPress’ website dedicated to this (Administration over SSL).

I’ve spent the last few days setting up WordPress as a CMS and webshop (with wp-e-commerce) for a company. While there are no credit cards involved in the webshop, I still wanted to secure the login and admin page. However, since the website is hosted at Dreamhost, I was limited to the .htaccess file. Moreover, since the .htaccess-file is the same for both SSL mode and non-SSL mode, I needed to use some kind of condition to avoid creating an infinite loop.

Enough rambling. The code snippets over at ‘Administration over SSL’ didn’t work, so I had to write one myself. Here it is:

RewriteCond %{HTTPS} !=on
RewriteRule ^(wp-admin.*|wp-login.*)$1
RewriteCond %{HTTPS} =on
RewriteRule !^(wp-admin.*|wp-login.*)$1

Also, please note that this snippet must be after WP’s own redirection snippet, otherwise it won’t work. The entire .htaccess file looks as follow:

RewriteEngine On

## WordPress' SEO permlinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

## Beefing up the security
RewriteCond %{HTTPS} !=on
RewriteRule ^(wp-admin.*|wp-login.*)$1
RewriteCond %{HTTPS} =on
RewriteRule !^(wp-admin.*|wp-login.*)$1

Update: This will actually not work very well as images for the back-end are not stored in any of the SSL folders. Hence the the server tries to serve the images without SSL while you are in SSL mode, which does not work very well.

Viktor Petersson <![CDATA[Introducing FML Ninja]]> 2010-01-05T14:50:41Z 2010-01-05T14:50:41Z FML stories is one of those things that can only really thrive in the semi-anonymous world online. If you have never heard of the FML phenomenon yet, it’s a one or two sentence long story about how miserably the author’s life is or how they have managed to screw up.

I’ve been a fan of FML stories for a long time, as they are very entertaining to read. For quite some time I’ve received my daily dosage of FML stories from FMyLife, but with the raise of Twitter and countless competitors, it’s role became less important.

To resolve this problem, we created FML Ninja. With FML Ninja you can access FML stories from around the web in one place, as we aggregate stories from multiple sources (including FMyLife and Twitter). But we didn’t stop there. We also added a Digg-like voting system that allows our users to vote up their favorite top FML stories.

Ready to change the way you read your FML stories? Then check out FML Ninja now.

Viktor Petersson <![CDATA[How to get Celeryd to work on FreeBSD]]> 2010-09-05T11:56:11Z 2009-10-23T12:39:46Z Update: Please note that this does not apply to FreeBSD 8.x as POSIX Semaphores are now enabled by default. Hence you do not need to recompile the kernel.

Celery is a great product. Unfortunately getting it to work on FreeBSD is a bit of a hassle. After some troubleshooting we managed to get it running, here’s how we did it.

We are running FreeBSD 7.2, but this is likely to work on 7.x.

Step 1: Recompile kernel

I assume that you know how to compile the kernel on FreeBSD. If not, you can find out how to do it here. I also assume that you have the source code for FreeBSD installed.

Let’s head over to the code.
#cd /usr/src/sys/i386/conf

Make a copy of the standard kernel-config.

Now we need to edit the kernel-config. You can obviously use any editor, but I prefer joe.

Change the ‘ident’ from GENERIC to YOUR_KERNEL

This is the most important part. We need to add support for POSIX Semaphores. Add the following line:
options P1003_1B_SEMAPHORES # POSIX-style semaphores

That’s it for the kernel-config. Now just save the changes and exit (^K+X in joe).

Next up is the compiling and installing the actual kernel.
#cd /usr/src
#make buildkernel KERNCONF=YOUR_KERNEL
#make installkernel KERNCONF=YOUR_KERNEL

That’s it. If everything went well, you should now have a kernel with POSIX Semaphores enabled.

Step 1: Install Python

I assume you got the ports installed, so here we go.

#cd /usr/ports/lang/python26
#make config

Make sure to select SEM and deselect PTH. If PTH is enabled, Celery won’t work.

If you’re running FreeBSD <7.2, you will need to edit Makefile and comment out the following:

Line 63-71:
#.if defined(WITH_SEM)
#.if ${OSVERSION} >= 701106
#SEM_MSG= ""
#IGNORE= POSIX semaphore support only works in FreeBSD 7-STABLE and later
#.endif # ${OSVERSION} >= 701106
#.else # !defined(WITH_SEM)
#SEM_MSG= "@comment "
.#endif # defined(WITH_SEM)

and line 186:
#.if ${OSVERSION} >= 701106

Next up, install Python:
#make clean install

Step 3: Test with simple app

With Python installed, let’s see if it actually works. To accomplish that, we will create a simple app.

Create a new file:

import multiprocessing as mp
p = mp.Pool(16)
import time
p.apply_async(time.sleep, 1)

Let’s run it:

If the application silently exits within a second or so, you’re good to go. If not, please re-visit Step 1 and Step 2 to make sure you configured everything properly.

Step 4: Install Celery

This is probably the easiest step:
#easy_install celery

That’s it! Good luck!

Credits: Thanks asksol and raysl over at #celery.

Alexander Ljungberg <![CDATA[New stuff at Email Service Guide]]> 2009-09-27T02:21:47Z 2009-09-27T02:21:47Z We have recently introduced news and articles over at Email Service Guide to complement the guide part itself. The theme is of course email in the form of reviews, analysis and how to’s. Here’re the current highlights:

We’ll definitely be adding to this list quickly in the coming week so make sure to check back often if you’re interested in the email space.

Viktor Petersson <![CDATA[How to recover from when Spaces/Expose stop working]]> 2009-09-18T20:13:12Z 2009-09-16T20:55:58Z Did Expose/Spaces stop working all of the sudden? This happens to me almost every day. Most of this time this is when I resume my MacBook Pro at home. I assume this has something to do with the fact that I have an external monitor connected at the office, and that somehow messes with Expose/Spaces. Luckily there is a quite simple solution.

  • Fire up Activity Monitor (/Applications/Utilities/Activity Monitor)
  • Filter the results for ‘Dock’
  • Click on ‘Dock’ and ‘Quit Process’
Filter for 'Dock' in Activity Monitor

Filter for 'Dock' in Activity Monitor

Unfortunately this will collect all windows into a single ‘space,’ but you will be able to once again use Expose/Spaces. Enjoy!

Viktor Petersson <![CDATA[Building the perfect networked media center with Plex and iLife.]]> 2009-09-01T16:39:45Z 2009-09-01T16:39:45Z I know, I know, this topic has been covered a billion times before. Everyone has got their own idea of what the perfect multimedia system is. But hear me out, I think you’ll like what I have to say. Since you’re probably in the process of upgrading to Snow Leopard, perhaps now is a good time to reorganize your media.

When we’re done you will have the following:

  • Central iPhoto and iMovie libraries
  • Your central iPhoto library accessible in Front Row
  • All your music, movies and TV shows, organized and accessible directly from your remote control

Have all your media accessible with your remote control.

Have all your media accessible with your remote control.

The requirements

Like all solutions, there are some requirements. However, I would consider these requirements pretty basic. For most gadgeteers out there, these are things you already got in your possession:

  • A Network Attached Storage (eg. Drobo, ReadyNAS, or an old Linux box). Preferably something with some redundancy (RAID1, RAID5, RAID-Z etc.)
  • Two or more Macs with Leopard or later (perhaps a Mac Mini to the TV/Projector and an iMac as a desktop)
  • A lot of media (picture, music, movies, TV shows etc).
  • Sounds too good to be true? Well, it isn’t. Best of all, you won’t have to spend a single dime on software. So what’s the secret? Good ‘ol UNIX symlinks and a software called Plex. That’s it.

    Configuring the NAS

    Since I have no idea what kind of NAS you’ve got (and it doesn’t really matter), all I’ll say is that I recommend that you create the following shares:

    • ‘pictures’ – for the iPhoto library
    • ‘videos’ – for the iMovie library
    • ‘movies’ – for all your movies
    • ‘tvshows’ – for all your TV shows
    • ‘music’ – for all your music

    If your NAS supports AFP, that’s great, but SMB will do just fine too.

Copying the media to the NAS

While I’m not going to cover how you copy your movies, TV shows and music (as I assume you know that), I will however cover how you copy your iPhoto and iMovie libraries.

Start by connecting to your network shares ‘pictures’ and ‘videos’ (or equivalent). You can do that either by browsing to them in Finder, or use Finder’s ‘Connect to server’ feature (available under ‘Go’ -> ‘Connect to server’).

If you’re a power user, skip the next four paragraphs.

Let’s start with the iPhoto library. Open up your home directory and go into the ‘Pictures’ folder. Now copy the ‘iPhoto Library’ folder over to the share ‘pictures’. Depending on the size of your archive and the speed of your network, this can take a while. Once done, rename the folder ‘iPhoto Library’ on your local computer to ‘iPhoto Library.old’ or something similar.

Now, this is the important part. Go over to the ‘picture’ share on the NAS and drag the iPhoto Library back to the local folder while pressing Command and Option. An arrow will show up under the icon you are dragging. Release the mouse button. If the files start to copy, you did not successfully press Command and Option.

We’re now done with iPhoto. You should now be able to fire up iPhoto and it will access the photos directly from the NAS. To do the same for another computer, all you need to do is to rename the local ‘iPhoto Library’ into something else, and create a link as we just did above.

Next up is the iMovie library (if you use it). Start by opening up the two folders (‘videos’ on the NAS and Movies in your home directory). Now copy the ‘iMovie Projects’ from the local Movies folder onto ‘videos’ on the NAS. Next, rename ‘iMovie Projects’ on the local machine to ‘iMovie Projects.old’ and create a link to the NAS (by dragging it from the ‘videos’ folder to the local ‘Movies’ folder with Command and Option held down). Repeat the same thing with the folder ‘iMovie Events’.

For the power-users out there, there is an easier way to do all this. Simply fire up the Terminal and run the following commands:
$ rsync -aP "~/Pictures/iPhoto Library" /Volumes/pictures/
$ mv "~/Pictures/iPhoto Library" "~/Pictures/iPhoto Library.old"
$ ln -s "/Volumes/pictures/iPhoto Library" ~/Pictures/
$ rsync -aP ~/Movies/iMovie* /Volumes/videos/
$ mv "~/Movies/iMovie Events" "~/Movies/iMovie Events.old"
$ mv "~/Movies/iMovie Projects" "~/Movies/iMovie Projects.old"
$ ln -s "/Volumes/videos/iMovie Events" ~/Movies/
$ ln -s "/Volumes/videos/iMovie Projects" ~/Movies/

For additional computers, just run the same commands, but leave out the rsync.

Automounting the shares

While you would imagine this to be very easy on a UNIX based system, it’s surprisingly difficult on Mac OS. Perhaps there is a better way, but this is the most straight-forward solution I’ve found. If you know of a better way of doing this, please let me know!

Finder -> 'Go' -> 'Connect to Server'
From Finder, navigate to the ‘Go’ menu and select ‘Connect to Server’. Once it opens up, you need to enter the address to your NAS (complete with the names of the share). That is, if you NAS is named FOO, enter ‘smb://foo/pictures’ and press the plus icon. Repeat this for the share ‘videos’.

Next we need to open up the folder ‘Library/Favorites’ in your home directory. Within this folder, you will see the two shares you just created in the step above. Leave this Finder window open while you click on ‘Apple’ -> ‘System Preferences’ -> ‘Accounts.’ Then select ‘Login Items.’ Now drag the two shares from Favorites into the list of Login Items.

The Items list after dragging in the two shares.

The Items list after dragging in the two shares.

The two shares will now automatically mount upon login for the current user. As noted above, this is not a great way to automatically mount shares, but as far as I know, this is the most convenient way. Keep in mind that, if you do not automatically mount the shares, you will not be able to access your iPhoto/iMovie library until you’ve manually mounted the shares.

Moving on to the other media

With iPhoto and iMovie moved to the central storage, it’s time to move on to the other media. Luckily this is much easier.

The cornerstone in managing all the remaining media is a software called Plex. If you never heard of it, Plex is basically a Mac OS version of the popular media center solution XBMC for Xbox. In its look and feel, Plex is quite similar to Front Row, but it offers a plethora of features that is missing in Front Row. Not only are you able to watch your Movies and TV Shows, you will also be able to install apps within Plex which allow you to stream media directly from sources such as Hulu and BBC.

Plex ContentAssuming you’ve already downloaded and installed Plex, just launch it and head to ‘Watch your Videos’ -> ‘Add Source’ -> ‘Browse’ -> ‘Windows Network (SMB)’ -> Locate your NAS and select the share ‘movies’ and press ‘OK.’ Now go to ‘Set Content,’ select ‘Movies,’ ‘imdb,’ and then press ‘Select’. Plex will now scan through the folder and all its sub-folders and run it against imdb to try to figure out what it is. If the movies are properly named, Plex will fetch the description of the movie, the cover as well as the full name and year. It will then take all of that data and present them neatly organized under ‘Watch your Movies’

Now repeat the same thing for ‘tvshows’ and ‘music,’ but select the content accordingly.

The whole process is pretty straight forward, but since the Plex Wiki already does a great job of describing this process in greater detail, I will simply recommend that you read more about that there.

There you go, that’s it really. While there is a whole lot of things that can be added to this article, such as iPhoto integration etc., I’ve intentionally left that out to keep the article a bit briefer. You might also wonder why I didn’t move the iTunes library over to the NAS. The reason for this is that I think that it might get corrupted if multiple users access it simultaneously. That’s why I instead suggested that you simply move the music-files itself to the network, and play them directly in Plex.

One obvious expansion of this setup is to include Plex Media Server. Perhaps I will cover that in a ‘Part 2′

Viktor Petersson <![CDATA[No more default prefix in YippieMove]]> 2009-08-28T17:10:54Z 2009-08-27T22:33:40Z Let me start by saying how much we appreciate the feedback from you guys. Your feedback is an important element in the way we drive the development of YippieMove.

No more default prefix in YippieMoveThanks to you guys’ feedback, we’ve now decided to remove the default prefix in ‘Step 3′. That is, in the past, when you’ve made a transfer with YippieMove from, let’s say, Yahoo Mail, all the transferred folders would by default end up under a sub-folder on the destination side named ‘yahoo’. However, as many of you guys pointed out, that is not a preference. Instead, a you would rather see a seamless migration (ie. the old Inbox would end up in the destination Inbox).

For those of you who do prefer to still utilize our ‘prefix’ feature, that is still possible. Simply click on the ‘Bulk action’ text below the folders and select ‘Use a name pattern’. A window will now pop up where you can enter your prefix (eg. some-prefix/$SOURCE_NAME$).

Again, let me reiterate how much we value your feedback. If there’s anything you like or do not like about YippieMove, please let us know!

Viktor Petersson <![CDATA[Introducing]]> 2009-08-24T12:54:17Z 2009-08-24T12:52:28Z When we introduced YippieMove about a year ago, we made it easer then ever before for
ESG Front Page

ESG Front Page

users to move their email between different email providers. That did however assume that you already knew where you wanted to move to. The email hosting space is a jungle with a ton of players offering similar products pitched with confusing marketing lingo and vague payment terms. So how can can you possibly figure which is the best email provider for your exact needs?

You could spend a few days doing research and browse through various pay-for-the-top-spot top-lists. Another, and much more efficient option, is to check out brand new service named Email Service Guide. With this tool you can find the best possible provider based on your criterions. With Email Service Guide, you are able to answer questions like:

  • Who is the cheapest provider that supports IMAP and gives me 8GB in storage per user?
  • What providers offers Exchange hosting with 99.999% or more Service License Agreement (SLA)
  • Where can I find email hosting powered by renewable energy?

At this point, our database features over 100 different email plans from all of the leading email providers on the market. Email Service Guide enables you to not only find the best provider according to your needs, but it also allows you to compare the matches objectively side-by-side.

Remember that, once you have found the best email provider for you needs, don’t forget to use YippieMove to move your old emails with you.

Viktor Petersson <![CDATA[FirstClass and an annoying IMAP bug]]> 2009-07-26T14:39:24Z 2009-07-25T10:29:09Z A few months back we were working with a potential client to do a rather large migration from FirstClass to Google Apps. However, during our pilot we ran into a bug in IMAP. Being a good citizen, we reached out to Open Text Corporation (the company behind First Class) to report the bug. We described the bug and told them how to replicate the bug.

Since we were unable to take on the job due to the bug, we didn’t pay much attention to First Class and assumed that they would fix the bug in the next release.

Last week, we took the time to install a local copy of First Class to see if they had resolved the problem. Unfortunately the bug still remained in the latest version (9.1). Because of that, we thought it might be appropriate to write a brief blog post explaining the bug.

About the bug

The bug is pretty straight forward. It occurs when a message has a subject line that includes one or more quotation marks (“). The problem is not that a quotation mark is an illegal character according to the RFC’s, but rather that FirstClass fails to escape them ( ‘ ” ‘ should be ‘ \” ‘). Because of this, when we issue the FETCH command, it’s impossible to tell where the different different segments of the respond ends.

To put this in a real example, here’s an example of the FETCH response First Class is sending:

212 FETCH (ENVELOPE (“Fri, 30 May 2008 15:11:42 GMT” “Re: Fwd: lorem ipsum “foobar”” ((“Replace Replace” NIL “replacel” “”)) ((“Replace Replace” NIL “replacel” “”)) ((“Replace Replace” NIL “replacel” “”)) ((“Repl Repl” NIL “repla” “”)) ((“Rep Rerpla” NIL “replace” “”)) NIL NIL ““) RFC822.SIZE 5120 INTERNALDATE “30-May-2008 11:11:42 -0400″ FLAGS (\Seen) UID 89423624)

If this was properly formatted, the response should read:

212 FETCH (ENVELOPE (“Fri, 30 May 2008 15:11:42 GMT” “Re: Fwd: lorem ipsum \”foobar\”” ((“Replace Replace” NIL “replacel” “”)) ((“Replace Replace” NIL “replacel” “”)) ((“Replace Replace” NIL “replacel” “”)) ((“Repl Repl” NIL “repla” “”)) ((“Rep Rerpla” NIL “replace” “”)) NIL NIL ““) RFC822.SIZE 5120 INTERNALDATE “30-May-2008 11:11:42 -0400″ FLAGS (\Seen) UID 89423624)

While you might not consider this a very serious but, it really is. FETCH is a very important feature in IMAP and more emails than you’d imagine includes a quotation mark in the subject line. Let’s just hope Open Text Corporation will have this fixed in the next release.