Conor Mac Aoidh
http://macaoidh.name
conor@macaoidh.name
 

Search

Archives

  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008

Spam

3,954 spam comments
blocked by
Akismet

Tag Cloud

    bt broadband CMS conor's management system conormacaoidh conor mac aoidh content management system drums fast Fedora fedora 10 furasta furasta cms furasta org gnome guide hello world HTML icsp iPhone jar Java javascript joomla kde Linux Mandriva mc kennas Monaghan Music mysql php Scratch stealing the ceiling The Dominican Affair the pot smoking pirates the strats tutorial Twitter updates web design forum webme webworks weekly tweets Windows wordpress

Ads

Mac OS X – VIM Templates

Posted Dec 24th, 2009 by Conor in in Linux, UNIX

I have always wondered if it was possible to use a template system with VIM. Whenever I used large editors it was usually because of the default template schemes they allow. I have always preferred using VIM because it’s so practical, and it’s useful to be able to execute commands in-between editing files.

Well anyway here are a few commands to configure a vim template system on UNIX (It should work on both OSX and Linux):

  • Download the template system:
    curl -C - -O http://www.vim.org/scripts/download_script.php?src_id=3747
  • Open VIM:
    sudo vim
  • Source the file you have downloaded from within VIM by typing:
    :source ./download_script.php\?src_id=3747
  • Now the VIM template system has been configured. The previous command should output the template directory so that you can create new templates, it differs depending on your OS.

That’s it if you need more info on how the system works you can visit the project homepage here.

No responses yet

The Kember Identity

Posted May 2nd, 2009 by Conor in in Fedora, Languages, PHP

This morning on twitter I came across something called The Kember Identity. Elliott Kember seems to have thought of something that simply hasn’t occured to the rest of the world. That thing has been aptly named “The Kember Identity”. It’s homepage is located here.

Anyway the Kember Identity is an md5 hash. Each md5 hash contains 32 characters so the KID is the theoretical hash that when it is encrypted it returns itself. At the moment this is a theory as it has not been proven. So Elliott has started a competition to see if anyone can figure out if the KID actually exists and if so what it is.

I have chosen to enter this competition with a PHP script that I wrote just a few minutes ago. It’s fairly simple and I have added a html table in there to clean it up a bit. Instead of computing endlessly this script displays all failed equations as it goes. When it finds the KID it will stop and show it in bright green. I ran the script for a few minutes and got to 200,000 hashes with no luck. Also FireFox froze a few times while running it. The best thing to do is just leave it to do it’s job and don’t do anything else while it is working!

You can view it here: http://files.macaoidh.name/php/the-kember-identity/md5.php


<?php

function encript($str){ return md5($str); }

function generateSum(){ return md5(mt_rand()); }

function loKIDe(){
  $s=generateSum();
  $md5=encript($s);

  echo '<tr><td>'.$s.'</td><td>'.$md5.'</td>';

  if($s!=$md5) return false;
  else{
    echo '<tr style="color:green"><td>'.$s.'</td><td>'.$md5.'</td></tr>';
    return true;
  }
}

echo '
<h1>Finding the Kember Identity...</h1>
<table>
  <tr>
    <th>32 Digit Number</th>
    <th>Md5 Of Num</th>
    <th>Count</th>
  </tr>
';

$num='';

while(loKIDe()==false){
  $num++;
  echo '<td>'.$num.'</td></tr>';
}

echo '</table><br/><br/>  If you are seeing this then the line above is equal';

?>

This script should, in theory, find the KID. But it is really a matter of time. I am going to keep it running all night tonight and see if I have any luck. Kae is thinking of writing a JavaScript version that will spread the load between multiple computers thus reducing calculation time. So the race is on! I hope that I am the first to find this magical, mysterious number!

7 responses so far

Hello World – Java

Posted Apr 26th, 2009 by Conor in in Java, Languages, Linux

I wrote my first Java application today. Ir is traditional to start out with something simple and boy this is simple and it works!

First you need to download and install the Java Development Kit (JDK) from Sun here. Then change directory to your workspace – where ever you want! In my case it was:

cd /home/conor/java

Then open up a new file named HelloWorld.java in your favourite text editor. In my case it was:

vim HelloWorld.java

Now we start the coding:

class HelloWorld{
  public static void main(String[] args){
    System.out.println("Hello World!");
  }
}

This is basically just a class that tells Java to output the words ‘Hello World! Now the code must be turned into machine code so that it is faster to run. To do that simply type:

javac HelloWorld.java

This creates a new file named HelloWorld.class which is written in machine code. If you open this file in your text editor all you will see is a load of gobledeegook. Now the application is ready to run. Type the following command to run it:

java HelloWorld

You should then see Hello World! written on your screen like this:

[conor@host java]$ java HelloWorld
Hello World!

Another one in the bag!

3 responses so far

yum install mplayer

Posted Apr 6th, 2009 by Conor in in Fedora, Linux

Who would have thought that it would be so much bother just to install mplayer?

yum install mplayer

Oh my god. It doesn’t work.

I just re-installed Fedora 10 last week and didn’t get around to installing mplayer until now. I can distinctly remember that when I did it on my older installation it installed without a glitch.

Anyhow this time I just sat there and scratched my head for a while. I never really made a decent attempt to do anything about it until now – enough became enough! I want my music back!

Ok lets start with why this is happening in the first place. You see recently livna (an rpm repository) merged with two other repositories and formed rpmfusion. But linva still exists. It still has some packages that rpmfusion doesn’t, don’t ask me why! So there is an easy way around the problem; install both of the damn things!

yum install livna

Click here to download rpmfusion F 8,9,10.

Then simple as:

yum install mplayer

and hey presto!

2 responses so far
Next Entries »



Conor's Blog is powered by Wordpress | Template design by Conor Mac Aoidh