Archive for the ‘Uncategorized’ Category

Script to proxy git and svn protocols via http proxy

Monday, August 31st, 2009

In work I’ve discovered a number of problems when accessing open source code repositories that are using SVN or GIT. Attempts to access a number of repositories just fails with a connection failed message.

After some time of getting these, and finding some repositories working, I noticed that the common attribute for those repo’s that were accessible, was that they were via http. Now that might be fine, but there is a reason for the repositories to have their own protocols, in that they are tuned to be more efficient at transferring the necessary information. In addition not all sites make the repositories available over http in additional to the native format.

Obviously the core problem here is with the corporate firewall blocking outbound requests over certain ports. Perfectly understandable, but sometimes just a little unhelpful when you need to be able to access various upstream repositories when working with open source to check for bug fixes in the code.

After several problems in accessing some git repos that didn’t have http equivalents I did some searching and found the following website http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/ which described how you could use socat to create a tunnel that allowed access to git repositories without having to find one that permitted access over http.

(more…)

DVD Recorder – Philips DVDR3480

Sunday, December 28th, 2008

Just picked up a DVD recorder for the TV, yesterday. Personally I have pumped for the most kitted out, but my girl friend is more rooted in real life and points out that most of the feature rich ones are still quite expensive.

Looks a nice piece of kit, and seems to be reasonably good €129 (Dec 2008). Have yet to try out the recording features, but it already does one thing that I really wanted, play region 1 DVD’s. :-) Of course I did have to unlock it to do that.

Why Unlock?

Probably a question used by legal people to suggest that it’s somewhat illegal. Basically region locking is only present to allow for artificial control of markets and to try and prevent the natural economic laws of supply and demand from equalizing prices all over the world. You’ll hear sometimes the arguments that people in some regions can’t afford the true price and so the publishing houses need to be able to sell them for cheaper there. That’s a load of crock, if they don’t make money from it, they won’t sell them. It’s always been a question of how much they can jack up the prices in the regions where something is known to be popular.

For me, the main reason is that the selection of anime made available as region 2, is pretty dire. Since I use Linux and watch a lot of my DVD’s on the PC, I had built up a collection of region 1 anime that has not been released in region 2 (or at least has not been made available within the shops that I have access to). Thankfully Linux is capable of completely by passing the region codes on all DVD’s, not to mention able to skip sections that the DVD producers are obliged to force you to watch. You know the parts, the copyright notices, the Dolby Digital snippet, etc. Once you’ve seen one, you don’t really want to watch any of the others.

(more…)

stoping vim from autoindenting pasted text

Wednesday, March 5th, 2008

Vim has been my editor of choice for a while now. I’m not going to get into the whole emacs v’s vi debate, just take it that I prefer a modal text editor and vim suits my needs. So I’ve never seen a need to go and learn emacs.

Once of the little problems that has annoyed me for a while, but I’ve never gotten around to trying to do anything to solve it, is where when copy and pasting code from one file to another, vim automatically increases the indent on each line. Turning something that is nicely formatted with various tabing/spacing set into an unreadable mess.

Of course I kept meaning to have a look at this, since I was sure there was an easy fix. The problem reared its head on the wine-users list recently http://www.winehq.org/pipermail/wine-users/2008-March/029545.html, for which I decided to find the fix.

It was very simple in the end, http://vim.sourceforge.net/tips/tip.php?tip_id=330 and definitely a site that I will bookmark for future reference. :)

HTML Templating in PHP

Wednesday, January 9th, 2008

Have been meaning to try this out for a while now, basically because once you get the html code separated out from the PHP it becomes much easier to see what’s going on and change the style and layout of the web pages.

Easier because the PHP scripts basically become shorter, and changing the layout of a few variable place holders in html files is a damn sight easier than moving about chunks of code.

Current template code I’ve been using is from the PEAR project, http://pear.php.net/package/HTML_Template_PHPLIB, which is similar to the PHPLIB implementation. There were a number of other implementations available at the same time, but this appeared to be the easiest to use besides IT, http://pear.php.net/package/HTML_Template_IT, which is in fact broken.

Smarty and Flexy appear to be two other template engines that may prove interesting for use with PHP if I ever work on any other more extensive web development projects.

register365 and my domains

Wednesday, December 19th, 2007

Well I’ve finally managed to have my blog appear with my own personal domain :) , but boy was it fun trying to get here. And it’s also highlighted some interesting gotcha’s when requesting domain registrar to point your domains elsewhere.

So now I have darraghbailey.com, which points to this blog. But it wasn’t entirely straight forward. Upon registering the domains I discovered that register365.com didn’t appear to have any mechanism to allow you to change where they pointed to. That would be something that is nice, even if it needed to go through an approval process. It appears that they are working on a lot of features for the user control panel since it lacks a great deal of functionality. Just trying to pay for your domains via the CP is impossible. On the plus side, the support team at register365 is very responsive, so it’s not really all that big of an issue.

(more…)