Showing posts with label open source. Show all posts
Showing posts with label open source. Show all posts

12 Apr 2018

Moving to GitLab

I’ve recently moved my repositories from GitHub to GitLab. I thought I share a quick post on why I did this and how to go about it.

Why Move?

GitLab has a number of advantages over GitHub for source code hosting:

  1. Free private repositories – GitLab is financed by their Enterprise tiers, and have a free tier for personal projects and small teams. GitHub is free only for public repositories.
  2. GitLab has built-in Continuous Integration/Delivery options built-in, and has a number of DevOps features available to integrate with your specific workflow.
  3. GitLab has a wider range of options for creating project specific sites (using GitLab Pages), such as allowing you to use custom domains and SSL certificates for each project.
  4. GitLab, unlike GitHub, has an open source community edition (with an MIT licence), allowing you to setup your own GitLab server to self-host.
  5. GitLab has pretty much all the features that you expect from GitHub (Wikis, Markdown-based readmes, issue tracking). An important consideration for me was that GitLab, like GitHub, also offers Two Factor Authentication (2FA).

The disadvantages of moving to GitLab are:

  1. As GitHub has been around longer, network effects mean that the majority of developers and projects are already using it. As of 2017, GitHub had some 26 million user and 67 million repositories.
  2. Occasionally you can have slow UI performance.
  3. Both offer integration with a number of third party services (such as Trello, Slack, Jenkins) but GitHub currently offers more integration options than GitLab.

How to Move

GitLab has made made migrating from GitHub very easy. Simply create a new project, and on the new project page, select the ‘Import project’ tab. From here, you can select the GitHub import option. You will then be asked to sign in to GitHub and to authorize GitLab to access your GitHub repositories. On doing this, you are taken to the GitHub Importer page, which lists your projects on GitHub. You can then select the projects to import to GitLab individually, or simply import them all:

Note, the import preserves the repositories commit history. Once the projects are successfully imported, you can then decide whether to delete the source projects on GitHub. I deleted all of my private repositories on GitHub, and maintained only my public projects.

As GitHub is the more popular site for hosting source code, I wanted to be able to keep hosting and updating my public projects there easily. I had thought initially to add GitHub as a second remote to the new GitLab repository, so I could update both GitHub and GitLab repositories from the command line. However, it turns out that GitLab offers the Repository Mirroring feature. From the GitLab documentation:

There are two kinds of repository mirroring features supported by GitLab:
push and pull. The push method mirrors the repository in GitLab
to another location, whereas the pull method mirrors an external repository
in one in GitLab.

By configuring the public repositories to push to the corresponding GitHub repository, I can simply commit my code to the GitLab repo as normal, and the commits are automatically reflected in the mapped GitHub project.

Once the push mirroring was configured, I found that I could commit to GitLab and the code changes would be pushed to GitHub in a matter of seconds!

Migrating to GitLab was a very simple process, and so far, I’m very happy that I made the move.

13 Jan 2017

Goodbye to Delicious, Hello to Pocket

After some 6 years of using Delicious to store my bookmarks, I've finally admitted that the service is effectively dead, and have now moved to use Pocket instead. I’ve updated my Links page accordingly, and I have also deleted the old bookmarks RSS feed on FeedBurner (another service in terminal decline).

The final straw for me with Delicious was finding that the export option was no longer available, and the developer API was gone. This meant that I had no way to export and back-up my some 5000 bookmarked links. Luckily, I had an export of my Delicious bookmarks from last year. I went through my most recent Delicious bookmarks and manually transferred the most useful to my Pocket reading list.

I’ve been using Pocket for over 8 years, back when it was know as Read It Later and it was a simple reading list add-on for Firefox. Since then it has developed considerably. I’m particularly fond of the excellent iOS app, something I use daily. The premium subscription is a bit steep ($45/£37 per annum), but given I’ve been using their service for so long for nothing, it seems only right to pony up for it. I did consider combing Pocket with PinBoard (and this may happen at a later date), but Pocket alone is sufficient for the moment. I’m not interested in saving 1000s of links that I’ll never look at again, as I did with Delicious.

Again, I’m struck how important it is that you keep control of your data, even something as minor as a list of bookmarks. This is something I touched on earlier last year when I wrote about the shutdown of the Shelfari service. Often, you will lose this control when using a free/freemium service, as the service provider gradually attempts to lock users in.

As a result of thinking about this, I plan to move to use either paid services that give me more control of my data, or to use self-hosted open source applications. I’ll be writing more on this soon. If you have any thoughts on this, I would love to hear from you.

21 Aug 2016

Forgotten Your Restriction PIN for IPhone?

Recently, I forgot the restrictions PIN on my iPhone (fat thumbs when initially setting it). I eventually recovered it by using the very useful pinfinder utility. This console program, written in Go, was kindly developed and open sourced by Gareth Watts. His utility recovers the restrictions (parental) passcode on iPhones, iPads and iPod touches from an (unencrypted) iTunes backup.

I’m blogging about this to help anyone with the same problem, and also to recommend pinfinder, so people use it rather than one of the rather dubious other commercial products that are available.

Download the latest release of pinfinder from here:

https://github.com/gwatts/pinfinder/releases

2 Jan 2015

A Base .NET Console Application

I often use use console applications to put together proof of concepts and demos.  So I was very interested in this base console application from John Atten. However, while John’s console template was built to be interactive, I wanted a simpler base console that I could use as a starting point for any project. 

The source code for the application can be found on GitHub

At the minute, the solution is nothing more than a skeleton application with logging, error handling and strongly typed configuration settings provided.  It also makes use of a command line parsing library to allow easy addition of new commands. 

This is just an initial draft of the base console application. As I’m working on a couple of projects that will make use of this base console application, I’ll update the solution with any improvements I can think of in the next few weeks. I'm also happy to take pull requests, suggestions, and ideas for ways it can be extended.

Also, when developing the solution, I came across a minor issue with the BizArk toolkit, used for the command line parsing. I submitted a patch for the issue (that can be seen here), following these instructions from Scott Hanselman. My first patch to an open source solution!