OpenVPN & Windows Vista/7

Written by

I have started using OpenVPN on Windows 7 and its pretty good apart from the default client setup leaves the connection under the “Public” settings and so network shares and discovery etc do not work.

After reading a few guides, there were two ways mentioned; set all public networks as private and allow the services through which wouldn’t be a good idea as I regularly use public WiFi and secondly, a MS PowerShell script that sets the NDIS Device Type endpoint to a non-true network connection (i.e. for smart phones) and that sets it to private but you cannot is it in “Networking and Sharing Center”.

I found a solution; set a default gateway for the connection.

route 9999

change to your VPN server’s connection IP and stick it into your client.ovpn file.

The 9999 is a forced metric which puts it as a secondary default route (i.e. internet router) and seeings as the VPN will go down once the internet as gone, this will not effect your surfing habits.

NS2 on Fedora

Written by

My friend needed NS2 installed on Fedora 14 and he wasn’t confident in BASH (Borne Again SHell) so I helped him a little. I don’t have a Fedora install at the moment but this his how we finally got it installed. It isn’t an easy install procedure.

yum install gcc-c++ libX11-dlevel xorg-x11-proto-devel libXt-devel libXmu-devel wget
tar -xzvf ns-allinone-2.34.tar.gz
cd ns-allinone-2.34.tar.gz
gedit ns-allinone-2.34/ns-2.34/mobile/

This will open up the gedit editor, if you have KDE, change this for kate.

Change the following:

resultPower = ErlangRandomVariable::ErlangRandomVariable(Pr/m, int_m).value();


resultPower = ErlangRandomVariable(Pr/m, int_m).value();

and change:

resultPower = GammaRandomVariable::GammaRandomVariable(m, Pr/m).value();


resultPower = GammaRandomVariable(m, Pr/m).value();

save and exit

then type

gedit ns-2.34/tools/

and edit:

return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);


return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

save and exit.


gedit ~/.bashrc

and add this to the file:




save and exit

source ~/.bashrc

This should hopefully work. If someone has an updated/corrected guide then please contact me and I’ll fix it.
If you are having problems with xgraph, try gnuplot, its slightly different but still plots graphs.

yum install gnuplot

This guide may work on Red Hat Linux too as Fedora and Red Hat are developed from the same arm of Linux distros.

Orange UK Livebox 2 Mini

Written by

If you can use computers and know how to wifi etc.

Replace it; its a heap of shite.


“I need a website”

Written by


A quote which I regularly hear from people is “I need a website” in which my response is “Why?“, I ask this as most people don’t even know why with an excuse such as “because everyone has one“.


The next stage in the initial meetings are about requirements and the client either knows exactly what they want or has no idea. Both scenarios can pose a great problem as people who know exactly what they want usually wont budge on a design style or look and people who don’t have a clue just don’t have a clue so getting any kind of constructive start is next to impossible.

Final result

Then comes the final result.

It is never what they “imagined” even if they design an interface and colours etc or if you show them designs at every stage. That is to say it isn’t “Great“, “Fantastic” and “Amazing” because it is and the client will say so but the looks are never quite right. and this is why.


People outside of a field of work does not know the standards of that field, I do not know the medial quality standards but I do know the W3C Standards for websites.

When I try to explain that websites have a standard to conform to, I get blank looks as though I am speaking french (Which I do not and if I tried, it would be utter shite). Why can people bot comprehend that there are standards to everything, cars, medical procedures and yes, websites. These standards are put into place for reasons and for websites, it is to create a structured code that will be understood by any browser and displayed correctly.


Accessibility for websites is a mine field and a dangerous one. There is basic accessibility included in the XHTML 1.0 standards but for true accessibility for people with all kinds of disabilities to be able to access the site, then a lot more work needs to be done and it needs to validate against the WAI WCAG standards.

For instance, basic accessibility requires alt attributes in images etc which conform to the W3C XHTML standard but then there is another set of standards purely for accessibility which require tags such as <label> and title attributes. These help screen readers for blind people to navigate and understand what is happening. Then there are plain stylesheets, alternate coloured stylesheets so people can remove the styling for easier reading and to remove colours if they clash especially in cases of colour-blindness. Then there are people with motor-neuron disorders which can use a site via eye control and voice control if it is setup correctly.

And once again, a client doesn’t understand that the internet is a wide open platform that can allow anyone access to any information and so this “unessential work” because these types of people are not interested in their site means the internet is restricted and that the site/client is effectively shutting them out because they are disabled.

Live Sites

So, why when we have these standards, do people not conform to them? I know that this blog currently doesn’t conform but that is because I didn’t code it and I’m working to iron out the bugs, but seasoned “Web Developers” that create commercial and personal sites do not follow these standards and yet get paid for it, isn’t this like paying a surgeon to give you an operation and then finding out he couldn’t be bothered to clean the instruments?

The standards are there for a reason, USE THEM!

End Rant

Useful Links

PHP Uptime Function

Written by

There is an updated version of this function.

I have been wanting to display the uptime of my Web Server so I wrote a little function.

It only supports Linux/Unix type systems but it checks for that and if its a Windows or Unknown system, it just outputs “Unknown”.

function uptime(){
 // See if it is a Unix Based OS
 if((PHP_OS == "Linux") || (PHP_OS == "FreeBSD") || (PHP_OS == "Unix") || (PHP_OS == "SunOS")){
  $uptime = file_get_contents( "/proc/uptime");
  $uptime = explode(" ",$uptime);
   $uptime_ = $uptime[0];
  $seconds = $uptime;
  $days = (($uptime % 31556926) / 86400);
  $days = explode(".",$days);
   $days = $days[0];
  $hours = ((($uptime % 31556926) % 86400) / 3600);
  $hours = explode(".",$hours);
   $hours = $hours[0];
  $minutes = (((($uptime % 31556926) % 86400) % 3600) / 60);
  $minutes = explode(".",$minutes);
   $minutes = $minutes[0];
  if($minutes > 0){
   $time = $minutes." mins.";
  if($hours > 0){
   $time = $hours." hours, ".$time;
  if($days > 0){
   $time = $days." days, ".$time;
  // Function Doesn't Support Windows
  $time = "Unknwown";
return $time;

Hope someone else gets as much use of it as me.