Securely Connecting to the WikiMedia Subversion Server from Windows

By , January 11, 2012 9:11 am

The WikiMedia Foundation (WMF) provides public access to the MediaWiki code base via a Subversion code revisioning system. For the majority of users who just want to be on the bleeding edge of MediaWiki simply pulling from this public server will suffice, however this only allows users read access to the repository. If you want to be a hardcore MediaWiki hacker you need to request commit access which will allow you to connect over the secure svn+ssh protocol and push your changes back into the core. There are a few prerequisites for gaining commits access, one of which is setting up an RSA key, which will be covered momentarily. Before we begin however, it is highly recommended that you read the entire Commit Access Guide available on the MediaWiki.org site.

NOTE: Though targeting The WMF Subversion server these instructions will be similar for all Subversion connections.

Get the apps

Before any work can be done two applications need to be downloaded, Putty and Tortoise SVN. These two applications will work together to connect you to the Subversion server.

Putty can be downloaded at: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Tortoise can be downloaded at: http://tortoisesvn.net/downloads.html

Run through their installation process and you will be ready to go!

Generating the Key

Access to the MediaWiki Subversion server requires you to first supply an SSH key to the WMF team to setup your account. Generating the key with the Putty Key Generator is quite simple with the following steps:

  • Run puttygen
  • Click on the Generate button and wiggle your mouse over the blank area.
  • Click Save public key and save it somewhere safe. For general convenience you should append “.pub” (Without quotes) to the end of the file name.
  • Click Save private key and save it somewhere safe. This private key you will want to keep as secure as possible, as with this key a malicious user could get into your Subversion account and wreak havoc.

Setup a session in Putty

Tortoise SVN uses the Putty sessions to secure the Subversion communication and manage your keys.

  • Run putty
  • Set the hostname of the server, input a one word session name, and click save

  • From the left menu select Connections > SSH > Auth. On this screen is a Browse button. Load the private key you create earlier here. The key should have a “.ppk” extension.
  • To make sure your key will always be available go back to the Session page with the left menu and click Save again.

Your Subversion key should now be setup and ready for use in Tortoise SVN

Checkout the MediaWiki files with Tortoise SVN

NOTE: In this section you will pull only one copy of the MediaWiki source to work with. This is just for demonstration purposes. See “Getting started and set up” for proper etiquette.

Tortoise SVN makes interacting with Subversion servers from Windows trivial.

  • Create a folder to store the MediaWiki files in
  • Right click the folder and select SVN Checkout
  • In the dialog box you will checkout with a URL starting with “svn+ssh://username@svn.wikimedia.org”. It is important to note here that “svn.wikimedia.org” DOES NOT refer to the URL of the Subversion server, but rather the session you saved in Putty previously. So if your session name was “awesomeness” you would use “svn+ssh://username@awesomeness”.  The rest of the URL will point to the code you desire to checkout, probably the URL svn+ssh://username@svn.wikimedia.org/svnroot/mediawiki/trunk/phase3 is what you want.
  • A new dialog should pop up showing you a list of files that are being downloaded. Go make yourself some tea, this will take a while.

After the checkout completes you will have the MediaWiki code. Get hacking!

Committing back to MediaWiki

Tortoise SVN makes committing code changes back to the MediaWiki repository easy. The following steps will get your code flying back along the wire.

  • Right click on the folder containing the MediaWiki checkout
  • If you have created new files they need to be added to the commit first
    • Hover over the TortoiseSVN menu item and a submenu will pop up
    • From this submenu click Add
    • And new files will be show in this dialog. Choose the files you wish to include in the commit and click Ok
    • Now the really hard part, right click on the MediaWiki checkout again and click SVN Commit
    • Fill in a message about your commit and look over the list of changes. When satisfied click OK.
    • A new dialog will pop up showing the files being committed and a status message after the commit finishes.

Congratulations! You have successfully committed new code to the MediaWiki Subversion repository and enriched the community. Your code will now undergo a review process and if solid will be released with the next version of MediaWiki.

My WordCamp Victoria 2012 Presentation: The Proof is in the Pudding – Yep it works with Microsoft

By , January 8, 2012 7:42 pm

Microsoft has been making a great effort over the years to embrace Open Source technologies and bring further support for Open Source projects to its platform. I was recruited last year by Microsoft to help further the interoperability cause and work heavily with PHP on Microsoft platforms. The platforms and tools of today have reached a point where running PHP and other Open Source projects in a Microsoft environment is a very viable option. This is especially great if you work at a location which primarily runs Microsoft products and does not have strong knowledge of setting up and maintaining Linux servers. During my presentation I will provide you with a "Microsoft Cookbook" of resources that will get you up and running with WordPress in a way that allows you to take advantage of everything from small shared hosting up to leveraging the amazing power of the cloud.

During this presentation you will learn about:

  • Openness at Microsoft
  • End-to-end WordPress development with WebMatrix
  • How to run WordPress in the Windows Azure cloud
  • Where to find free tools from Microsoft, such as Windows Server, SQL Server, etc
  • How to manage WordPress with Windows on the go

Click the title slide below to download the presentation in PDF format

I will be posting pictures from this WordCamp on my 2012 Victoria WordCamp gallery album

Introducing the Meetup API client for PHP

By , January 2, 2012 6:11 pm

I am working on a pretty major project right now and one of the requirements is the ability to interact with the Meetup API. I looked around and found one existing Meetup client in PHP, however it is horribly architected and as I started using it thinking I could improve it I decided it would be too much work and scrapped it to build my own. This new client is much more compact and efficient. The excerpt from the Meetup API client for PHP website says:

Meetup (http://meetup.com) is a social networking site based around community groups. Meetup provides an API to access their platform services from remote applications to manage authentication, events, rsvps and more.

Until now a good PHP client for the Meetup API has not existed. This project aims to bridge that gap by providing a high quality stand alone Meetup API PHP client. This client is simple to use through provided classes and also allows powerful advanced usage through direct queries to the API

The client is quite simple to setup and get running in your application quickly. Most of the GET endpoints are currently supported with plans on implmenting the rest and support for POST on the way. Check the following resources to get up and running.

You can get the client from the Meetup API client for PHP Github project page

Please try it out and leave feedback on issues and desired additions on the project issues page

P.S. oAuth support is currently in the works!

Beautiful sunset on Puget Sound

By , December 22, 2011 4:00 pm

From the boat in Bremerton, WA

Hello Gorgeous Pulled off the rock – Port Townsend Fall 2011

By , December 1, 2011 2:41 pm

If you have followed the plight of my friend Jody's beautiful sailboat, Hello Gorgeous you may remember she broke loose on anchor during a storm a while back. This video was recently uploaded to YouTube that shows her miraculous recovery. Somehow after pounding all night Hello Gorgeous was able to float and made her way back to the Port Townsend marina where she continued to float at the dock for a couple days before being hauled out for repair.



Original YouTube Clip

Theme by Blam Designs
Based on Themocracy