Archive for November, 2008

Basic C++ Calculator

November 20, 2008
By Killian

The below is a simple program to add, subtract, multiply and divide integer numbers. It’s the first program I wrote in C++ as a tester and most of the basic concepts are covered so I’ll go through them here in case they’re of help to someone else! I’ll admit the explainations below are a...
Read more »

Tags: ,
Posted in c++ | No Comments »

Mailer Shell Script

November 20, 2008
By Killian

This script uses the Unix mailx program to send a pre-scripted email to someone. It will take in an email address on the command line as an argument and send the mail to this address. Just copy and paste this into a file named mailerscript and change the file permissions to 755 and then...
Read more »

Tags: , , , ,
Posted in linux | No Comments »

Changing Your MAC Address In Linux

November 20, 2008
By Killian

In Linux is extremely easy to change your MAC address. All you need is a couple of commands. To start off you will need to take down the interface to make the change. To do so just type the following into your terminal: $ ifconfig eth0 down Now we can get to changing the...
Read more »

Tags: , , , ,
Posted in linux, networking | No Comments »

SSH Forwarding

November 19, 2008
By Killian

The basis for this particular article (and most of the info) came from one of the guys I work with, Gavin McCullagh, who I’m pretty sure knows more stuff than is good for him. It’s all pretty handy stuff, but can be irritating to get working Forwarding X Server If you want to forward...
Read more »

Tags: , , ,
Posted in linux | No Comments »

Renaming Files As Lowercase Using Perl

November 12, 2008
By Killian

This is just a handy script I use for renaming my music collection. It got to be too much trouble having the first letter of each word capitalised, getting new music with the names all in caps, or all in lowercase…so I decided to make everything lowercase and write a script to do it...
Read more »

Tags: , , , ,
Posted in perl | No Comments »

CsvSQL Man Page

November 12, 2008
By Killian

NAME Csvsql – use SQL queries to access information in CSV files DESCRIPTION csvsql enables you to access a CSV file as if it were a table in a database. This means you can use SQL queries, with each ’common seperated value’ as part of a column. Traditionally in order to access specific information...
Read more »

Tags: , , , ,
Posted in csvsql | No Comments »

CsvSQL

November 12, 2008
By Killian

About CsvSQL Csvsql is a project I started for my BSc’s final year software project. It is written in Perl and can be used to access information in csv files in the same way you would access a table in a database. This means you can use SQL queries, with each common seperated value...
Read more »

Tags: , , ,
Posted in csvsql | No Comments »

Printing In Perl

November 12, 2008
By Killian

Printing A String Printing a string in Perl couldn’t be easier, you simply use the print function. If you want to print a line in Perl you simple need to write the following: print "Hello World!"; Output: Hello World! Similarly you you print a variable as follows: my $string = "Hello World!"; print $string;...
Read more »

Tags: , , , ,
Posted in perl | No Comments »

Reading From A File In Perl

November 12, 2008
By Killian

Opening a file eading from a file in Perl is pretty simple. After all, the language is pretty much built around dealing with text. The first step is to open the file, in which case you just need to use the following: open(INFILE,"< myfile.txt") or die "Can't open file: $!"; In this statement we...
Read more »

Tags: , ,
Posted in perl | No Comments »

Perl Loop Basics

November 12, 2008
By Killian

For loop The below will print “Hello!” 10 times: for ($i = 0; $i &lt; 10 ; $i++){ print "Hello!\n"; } Output: Hello! Foreach loop For iterating through an array it can be handy to use a foreach loop. In the example below the foreach loop will access each variables in the array and...
Read more »

Tags: , , , ,
Posted in perl | No Comments »

Calendar

    November 2008
    M T W T F S S
        Dec »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930