Category Archives: Experience

“Connection reset by peer” error with Fastlane & Jenkins

About a week ago, my build machine with Jenkins stopped sending out builds. I went to investigate and found that Fastlane was failing during ‘sigh’ when it attempted to connect to Apple’s servers.

The error was:

Taking a look at Fastlane’s issue page on Github, I was able to see that many people were able to resolve the issue by updating Ruby to the latest version and then reinstalling Fastlane. So I tried that…

After running the commands, I kicked off a build, but it failed once again with the same error. Strange. I figured since it had the same error, it must have been a problem with the version of Ruby used by Jenkin’s “Execute Shell” step.

Everything looked fine to me. So why was it still showing the same error? I ended up re-reading the issue page on Github and noticed that someone mentioned that openssl was potentially the reason. So I checked mine and it turns out the version I was using was outdated. I ended up trying to update openssl  using homebrew.

This time I wanted to be sure that the build would succeed so I checked the versions before proceeding any further.

NO! That’s not the version that I just installed! Homebrew installed it to:  /usr/local/Cellar/openssl/1.0.2j .

So I naively attempted to link it:

Uh oh! Another error. Since openssl  is “keg-only”, I decided to create a symlink instead:

Nice! Now that everything looked like it was in order, I kicked off another build and it finally succeeded.

If you’ve encountered the same error, hopefully this helps you. I would also recommend checking your PATH  to ensure that /usr/local/bin  is before /usr/bin . If it’s not, you might be running a different version than expected.


Tagged , , , ,

HockeyApp plugin for Jenkins Doesn’t Show “Upload to HockeyApp” Menu Item

Since TestFlightApp is shutting down soon, I decided that I would migrate over to a different platform to handle my continuous integration builds distribution. I ended up choosing HockeyApp as the platform that I would use.

HockeyApp is well established in the mobile distribution industry. They’ve been around for quite some time, but I’ve always used TestFlightApp because of the simplicity and the pricing. The switch over to HockeyApp was quite easy. They offer an SDK similar to TestFlight and a plethora of apps – iOS, Android, Mac, and Windows. I was able to get a build distributed through the HockeyApp website in a couple hours. But this was a manual process and obviously it wouldn’t work well with what I was trying to do.

Jenkins luckily has a HockeyApp plugin and I was able to install it quite easily, just like any other plugin. But when I went to add the Post-Build Action for my job, there wasn’t an option to “Upload to HockeyApp”. I was able to install an older build and it appeared there correctly. What I found was that with the latest HockeyApp plugin for Jenkins, it was failing due to an older version of Java on the build server. I checked the version and it was 1.6.x. I upgraded it to 1.7.x and then re-installed the newer HockeyApp plugin. After the install, the menu item “Upload to HockeyApp” appeared in the Post-Build Actions. I’ve since updated Java to 1.8.x and the HockeyApp plugin still responds correctly.

TL;DR: If you don’t see the “Upload to HockeyApp” menu item, check to see if you’re running an older version of Java and update it if that’s the case. The menu item should appear for anything over Java 6.

Tagged , , ,

Updating Subversion on Mac OS X 10.8.x

A couple weeks ago I started using subversion via the command line on my laptop. I was able to quickly checkout my project and start developing immediately without any trouble. Then I decided I wanted some GUI support for subversion. I already was using SmartSVN for other projects and figured I should have all of my subversion projects managed by one tool. So I decided to point SmartSVN to my local working copy of the project and it proceeded to load up all the metadata into the app. Everything looked as though it had gone smoothly at this point.

Next, I went to Update the source and was prompted with a version mismatch error. The error something along the lines of the working copy was an older version and I needed to “upgrade” it to be able to use it with SmartSVN. That’s when I realized I obviously was running two different versions of subversion. A quick check proved that was the case, since I was using 1.7.x with SmartSVN 7.

tony@~/Documents/project$ /usr/bin/svn –version
svn, version 1.6.18 (r1303927)
compiled Aug 4 2012, 19:46:53

It turns out that Mac OS X 10.8.x runs Subversion 1.6.x. I proceeded with the upgrade of the working copy.

The next day, I started working on the project again, but my part of my workflow is to compile and run the project via command line with Ant scripts. When I ran the script, it immediately failed. I checked out the script and it was running svn info but it eventually failed with an error message. At this point, I knew it was another versioning issue with subversion. So I had to update Subversion on Mac OS X. Here’s what I did:

Downloaded Subversion from Apache and extracted. If you’re following these commands, make sure you replace the version number with the latest version.
cd ~/Downloads/
curl -o subversion-1.7.9.tar.gz
tar -xvf subversion-1.7.9.tar.gz
cd subversion-1.7.9

Configured and installed
./configure –prefix=/usr/local
sudo make install

At this point, I had a full working copy of subversion 1.7.x available for use.
/usr/local/bin/svn –version

One thing to note is that I still was using the older version of subversion by default. A quick svn –version would have shown that I was still at 1.6.xTo overcome this I updated my PATH with the new location.

vim ~/.bash_profile

Added in:
export PATH=/usr/local/bin:$PATH

Saved and then sourced it.
$ source ~/.bash_profile

Now when when I execute svn –version I see 1.7.x. You can also:
$ which svn


Tagged , ,

Line numbers in VIM

Temporarily display line numbers in VIM:

  1. Press ESC to enter command mode
  2. Type :set number
  3. Press Enter key

Always display line numbers in VIM:

  1. Navigate to ~/.vimrc
    If you don’t have one, create one.
  2. Press i to enter insert mode
  3. Add set number as a separate line to this file
  4. Press ESC to enter command mode
  5. Type :wq
  6. Press Enter key to save and quit VIM

No new pictures or videos were found on this device

The other day, I saved all of my photos and videos off of my iPhone 4S onto my computer using the “Import Pictures” wizard. I decided to not check the box that deletes the pictures and videos after saving, so after the whole process was done, I was stuck with 1000+ photos on the device. At this point, I was not ready to spend 20 minutes tapping on each picture one by one to mark them all for deletion. It really bothers me that Apple made a weird decision to not implement a “Delete All” button for the camera roll.

So I thought to myself, why not just delete all the photos and videos that were imported off of the computer, and repeat the process, this time checking the box to remove the items from the device. As soon as I plugged the phone back into my computer, I navigated to the “Import Pictures” wizard, and it gave me this awesome prompt…

Here’s when I began to worry about losing my precious photos and videos. I decided to take a picture using the camera on the device to ensure that there was a new picture for the wizard to pick up. This way, the wizard might recognize that none of the other pictures have been “saved” (even though I had already saved them previously). This time around, when I got to the wizard, it allowed me to save pictures, but it was only the one new picture that I had recently taken.

It turns out that Windows persists information about which photos or videos have been previously saved to your computer, so you can’t really save them again. I guess this was designed to prevent duplication of photos and videos on the computer. So to fix this solution all you have to do is delete or rename the file which stores all this information and you’ll be set.

For Windows 7 this file is:
C:\Users\<username>\AppData\Local\Microsoft\Photo Acquisition\PreviouslyAcquired.db

For Windows Vista the file is:
C:\Users\<username>\AppData\Local\Microsoft\Windows Photo Gallery\Pictures.pd4 (or sometimes .pd5)

Creating an MSI transform (.mst) file with Orca

Orca is a tool that allows you to edit an MSI file’s properties. With Orca, you can easily add customized text, add/remove installation screens, or even change certain conditions contained with the original MSI file.

You can download a copy of Orca from:


  1. Open Orca.
  2. Open the original MSI. File > Open > Browse to the MSI > Click Open.
  3. Start a new transform. Click on the top “Transform” menu, and select “New Transform”.
  4. Make changes. Navigate to a table you want to edit, and modify values.
  5. Generate the transform file. Click on the top “Transform” menu, and select “Generate Transform”.
  6. Save the transform file. Enter in a name for the transform file, and click “Save”.

You should now have a transform file (.mst) that contains the modifications to the original MSI. Keep in mind that the original MSI has NOT been modified. You will have to apply the transform to the original MSI to have the changes take place.

To run the transform:
In cmd, type:
msiexec /i <your_msi_file_here.msi> TRANSFORMS=<your_mst_file_here.mst>

For example:
msiexec /i orca.msi TRANSFORMS=transformOrca.mst

Using Sprites and MarkerImage in Google Maps JS API v3


Sprites are used frequently in modern websites. They are simply a large image that contains many smaller images. They have been around for quite a while and were used in old video games such as Doom. The idea was to load a single large image into memory and then to display parts of that image when necessary. This would avoid having to load new images every time a certain image was required. It is a common misconception that by having many smaller sized images, that the page will load faster. This isn’t true because of the way HTTP requests work. Each image requires a single HTTP request and most browsers will only execute two HTTP requests at a time from a single hostname. This provides a bottleneck which is seen when the page loads. So by using sprites, you can combine many images into a single large image. Then as a particular image is required, you can display a certain area of the sprite without requiring an additional HTTP request. Creating a sprite may seem complicated at first, but there are many tools that can help you create sprites from existing images. One of the tools I’ve used is a website known as

You may have noticed on some Google Maps implementations, markers on the map will have a unique or interesting image for their icon. Google Maps allows you to do this using the MarkerImage class.

The constructors you’ll need to be familiar with:
MarkerImage(url:string, size?:Size, origin?:Point, anchor?:Point, scaledSize?:Size)

Point(x:number, y:number)

Size(width:number, height:number, widthUnit?:string, heightUnit?:string)


To get a basic sprite image working with MarkerImage, you’ll need to determine the size of the image you want to display and its relative location in the sprite image. By default the coordinate system used by Google Maps specifies that the origin is located at the top left of the image (0, 0). If you want to go to the right, increase the “x” value. If you want to go down, increase the “y” value. Once you have all this information you can begin.

var size = new google.maps.Size(16, 16, "px", "px");

var origin = new google.maps.Point(0, 0);

var icon = new google.maps.MarkerImage("http://path/to/sprite.png", size, origin, null, null);

In the above code, I’m creating a size object of 16×16 pixels and passing it to the MarkerImage constructor along with the origin of the image I want to use starting at (0, 0). This means that once the MarkerImage is created, I’ll have a 16×16 px image from the point of origin of (0, 0) from sprite.png.

Now suppose the sprite contains two 16×16 pixel images one above another in the sprite.png and they were separated by a single pixel. I can now obtain that secondary image by changing the point of origin that is passed into the MarkerImage constructor. So in this case the new code to get the second image would be:

var origin2 = new google.maps.Point(0, 18);

var icon2 = new google.maps.MarkerImage("http://path/to/sprite.png", size, origin, null, null);

Now that the origin is located at (0, 18) the icon2 object will contain a different 16×16 pixel image starting from that location. Which in this case, is the second 16×16 image that I wanted. The reason why the origin is now located at (0, 18) is because the original 16×16 image started at (0, 0). Then you have to factor in the image size you just took which brings you to (0, 16). Since the images are separated by a single pixel, you’ll be at (0, 17). So that makes the start of the second 16×16 image one pixel further at (0, 18).

Last week when I was implementing this concept into a Google Map project I was working on, it was very difficult to find any good examples. I hope this serves as a simple example. You may have noticed that my constructor call for MarkerImage is also passed two null arguments. These are for the anchor and scaledSize parameters. With these you can do even more neat stuff with the MarkerImage class. For example, scaledSize will allow you to change the size of the image by stretching or shrinking it. For more information, check out the Google Maps API Reference. If you need more help you can check out this blog post by Marc Ridey.

Edmonton Startup Weekend

I’ve been quite busy lately and haven’t had the chance to write up a post about my first experience at the Edmonton Startup weekend event. For those of you that don’t know, Startup weekend is a 54 hour event that brings together software developers, designers, and business people that collaborate to build an application and maybe even start a business with. The event was held at the University of Alberta in the Computing Sciences Centre from February 11th to 13th. This is the second year that the event has been held in Edmonton.

To kick off Friday night, we all gathered around 6:00 pm in one of the rooms of the CSC building. The organizers introduced themselves, and gave a little overview of what the weekend would entail. From there, we were given the opportunity to discuss some ideas that people had in mind or wanted to tackle during the weekend. After a little mingling session, the organizers asked for everyone with an idea to come forward and present the idea to the rest of the group. Each person was given roughly a minute to give an elevator pitch to the rest of the audience about the idea they had and the kinds of people they were looking to work with.  After this, we all broke out into separate parts of the room to meet with people and discuss ideas we were interested in further. Shortly after, groups started to form and we ended up planning for the rest of the weekend before heading off for the rest of the night. When I first heard about the Startup weekend, I figured it would just be a bunch of developers looking to collaborate on a project, but I was wrong. I met a lot of people that night, with different skills and backgrounds. It was interesting to see such a diverse crowd of people that it completely changed my expectations of that weekend. I ended up going with the Rubber Chicken Assassin idea. The group consisted of nine other people including: Brendan, Cam, David, Eric, Jed, Jeff, Nathan, Pieter, and Sarah.

When Saturday came around, I reached the University at 9:00 am. This is when I had the chance to set up the development environment that I would work with for the rest of the weekend. I thought I would be quite a breeze to set up everything, but I was wrong. I had run into multiple issues trying to set up Ruby on Rails onto my Windows laptop. But with help from my teammates, I was able to get everything running within a few hours. From here, we started working on our assigned tasked. I was assigned to work with two other people, Nathan and Eric, on the server/back-end of the application. It was my first time using Rails so I had no idea what I was doing. Nathan definitely was the team lead for the three of us and helped us get through any problems we encountered. Everyone worked throughout the day right until 10:00pm when we decided to call it a night.

On Sunday, we met back at 9:30 am and began wrapping up our assigned tasks. We were to have our application/project ready for demos at 6 in the evening so you could imagine lots of frantic development happened during the day. When 6:00 pm rolled around, we rushed over to Original Joe’s for the closing of the second Edmonton Startup weekend event. Here, each group was given the chance to show everyone else what they had worked on for the past few days. When I saw some of the work that came out of this weekend, I was surprised by how much could actually be accomplished in such a short time. David Quail gave a great speech that night about his experience with a start up company. It was really interesting to hear firsthand from someone who had been there and knows what it’s like to be in a “startup” environment. To end the night, we all had drinks and got a chance to talk to the rest of the people who attended the event.

One thing that I haven’t mentioned yet is the food. The meals that were served over the weekend were AMAZING. We had pizza, pastas, salads, snacks, and even drinks throughout each day. I think I ate more that weekend, than I did the entire week before the event. Come to think of it, I spent more time eating than working!

Overall, my experience at the Startup weekend event was truly exciting and amazing. The people you meet and the experience you gain is well worth the price. The price of the event pretty much covers the cost of your meals, so really you’re getting to meet like-minded individuals and maybe even learn something new for free while having a blast doing it. I left the event with many new friends and some experience with Rails. I will definitely participate in the next event and recommend anyone else who is interested to attend as well. So keep your eye open for the next event and be sure to attend if you get the chance.

And for those of you that are curious, we will be continuing development with the Rubber Chicken Assassin idea. We hope to launch Phase 1 of it shortly. So look out for that too!