Archive

Archive for the ‘Linux’ Category

Quick keyboard shortcut tip for the EURO € symbol.

August 27th, 2010 Chris Ergatides No comments

I see that many people are still not aware of the various ways to insert a euro € symbol into their various e-mails, blog posts, IMs etc. and so I’m hoping that these tips will help somebody out there. If you are one of those people, read on!

As I constantly have two operating systems running at the same time, mainly Fedora Core 13 and Windows XP, the way that I have found works nicely in both is quite simply to hold down the Alt key which is to the right of the spacebar, then hit 4 which is typically also where the dollar $ symbol is on my keyboards.

If you are on Windows however and the above tip does not work for you for some reason, try the next one. Again, hold down the Alt key which is to the right of your keyboard and then on your numeric keypad, type 0128 and then release your Alt key.

Let me know if this works for you.

Categories: Linux, Technology Tags: , , ,

Running distributed.net’s dnetc client on a PPC (Dreambox)

June 19th, 2010 Chris Ergatides 2 comments

What?: distributed.net was the Internet’s first general-purpose distributed computing project.

Why?:

  • Why not?
  • The client uses idle CPU time only, so it doesn’t affect the way you use a computer.
  • In the end, some money goes to some nice organizations, such as the EFF.
  • More info, in their FAQ.

Why on a Dreambox?:

  • A Dreambox is just another PC running a version of Embedded Linux called BusyBox.
  • Since the dnetc client uses only idle time of its CPU, it does not affect your viewing experience on the Dreambox and you won’t even know it is running.

Read more…

Categories: Linux, Technology Tags: , , ,

Wireless LAN for Runlevel 3 in Fedora Core 12

March 29th, 2010 Chris Ergatides 6 comments

I’m writing this guide for Fedora Core 12, but I’m sure that it’s the exact same procedure for Fedora Core 11. It does not work pre Fedora Core 11. Also, this guide uses GNOME as a GUI.

I see that some folks over on FedoraForum.org are struggling with this. Hopefully this guide will help those who, like me, need a wireless connection from runlevel 3.

If you are not in runlevel 5 already, run “startx” in your command line to get to your GUI. You do not need to do this as root but you *will* need root access further down. Right click on the Network Manager icon and select “Edit Connections…”

Read more…

Categories: Linux Tags: , , ,

VAServe at it… again.

March 9th, 2010 Chris Ergatides 3 comments

I have just very happily flagged an e-mail from VAServ as spam.

Why? Well, no matter how many times I explain to them that I am no longer a paying customer, and no matter how many times they’ve asked me to pay for non-existent services, I am still receiving the likes of the following:


Subject: [OFFER] Windows HyperV via Poundhost/VAServ

Message: VAServe

What goes up won’t go down.

At Poundhost/VAServ we know that if your site is not up, your profits go down. Which is why we recently migrated your website onto a more secure Linux server platform.

However, threats are always evolving. To ensure that you are provided with the very best platform that’s reliable, secure, easier to manage, with greater interoperability and a substantially lower total cost of ownership, we recommend that you consider switching to Microsoft’s Hyper-V hosting platform.

Running on next generation virtualisation technologies Microsoft’s Hyper-V stores your data on a cluster of servers rather than one. So if a server is attacked, or goes down, the system automatically switches to the others. Thereby guaranteeing 100% uptime.

Migration is so simple you can do it yourself. However some of you may need to tweak or re-code your data beforehand to enable it to run on a Microsoft platform. Should you have any queries, call our contact centre on 01628 67 31 31.

Don’t delay though because we are prepared to offer a 10% discount to all those who migrate before 31st March 2009 using the coupon vdsmigrate.

See http://vds.poundhost.com for more information!


For your information VAServ, since you’ve lost all 3 of the VPS accounts that I had with you, I am still on a Linux VPS AND I have it on the cloud. So go sell your marketing bull elsewhere, not to people that you’ve let down so badly in the past.

Handy command line currency converter.

February 24th, 2010 Chris Ergatides 3 comments

In 2003, I wrote a custom Amazon-like shopping cart script. Back then, my web scraping skills weren’t, ahem, the best they could have been. For the site’s currency conversions, I had a cron job pull down 3 sets of converstions, calculated the average for each currency pair, then stored the result locally for my use.

At the time, I did this hoping that in a worse-case-scenario, a maximum of 2 sources would die in any weekend. Luckily, the sources lasted for the 3 years whilst I was working for that company (and apparently for another two after that). Now, I hear, they are manually updating a static text file… once in a while.

Today, I have no such needs but as always I am constantly looking for new ways to do things, should the need arise. I also needed a simple currency converter for doing small calculations like how much to top up a prepaid credit card by to purchase something from eBay which is listed in another currency.

Full credits to rafacas at commandliners for the inspiration and as he points out, note that the script uses Google Finance’s page.

#!/bin/bash

# 2009 - Rafa Casado - http://bit.ly/bYZwex
# 2010 - Chris Ergatides - http://bit.ly/9XjAUz

if [ $# -lt 2 ]; then
    echo -e "\nUsage: $0 currency1 currency2 amount"
    echo "Default: $0 GBP EUR 1"
    echo "Example 1: $0 USD GBP"
    echo "Example 2: $0 GBP USD 42"
fi

toUpper() {
    echo $@ | tr "[:lower:]" "[:upper:]"
}

if [ -n "$1" ]; then FROM=$(toUpper "$1"); else FROM=GBP; fi
if [ -n "$2" ]; then TO=$(toUpper "$2"); else TO=EUR; fi
if [ $TO == $FROM ]; then echo 'Nothing to do!'; exit 2; fi
if [ -n "$3" ]; then A=$3; else A=1; fi

CONVERTER="http://www.google.com/finance/converter?a=$A&from=$FROM&to=$TO"

RESULT=`wget -nv -O - "$CONVERTER" 2>&1 | \
sed -n -e 's/.*<span class=bld>\(.*\)<\/span>.*/\1/p'`

echo -e "\nResult: $A $FROM = $RESULT\n"

So, let’s say you’ve named the script currency.sh and made it executable with chmod +x, what does the output look like?

#Called without any parameters:
[chris@r500 ~/bin]$ ./currency.sh

Usage: /home/chris/bin/currency.sh currency1 currency2 amount
Default: /home/chris/bin/currency.sh GBP EUR 1
Example 1: /home/chris/bin/currency.sh USD GBP
Example 2: /home/chris/bin/currency.sh GBP USD 42

Result: 1 GBP = 1.1387 EUR
#Called with example 1's parameters:
[chris@r500 ~/bin]$ ./currency.sh usd gbp

Result: 1 USD = 0.6475 GBP
#Called with example 2's parameters
[chris@r500 ~/bin]$ ./currency.sh gbp usd 42

Result: 42 GBP = 64.8606 USD
Categories: Linux Tags: , , ,

Apache virtual hosts, _default_ and ServerName

December 2nd, 2009 Chris Ergatides 3 comments

I’ve recently changed my VPS provider. I won’t go into why, that’s a separate post for when I find the time and nerves to write about it.

Given the opportunity of the move, I decided to split my VirtualHost configuration out of a single httpd.conf file into per virtual-host config files. This by chance, is something that I knew that I could do since 1696 but never really realized the advantages of doing so before now.

Anyway, the mistake I made was to assign ServerName in httpd.conf to either a named or aliased VirtualHost. This caused a conflict which was solved as soon as I changed ServerName to something totally irrelevant.

Categories: Linux Tags: , ,

Installing Fedora Core 12 (FC12 “Constantine”) on old hardware.

November 30th, 2009 Chris Ergatides No comments

If you’re anything like me, you always want the latest, shiniest stuff running on your machines, even if you’re not supposed to be able to do so.

I think that this is what FC12 was trying to tell me by flashing a very brief message along the lines of “You do not have enough RAM to run the graphical installer.” whilst trying to do a clean install on an old P3 800Mhz machine (a quick search confirms that I’m not the first to get this). It subsequently kicks into text mode installer, gets your keyboard, partitioning, root password and timezone settings, then goes off and installs exactly 200 packages without even asking you what you want to install.

When it is done doing that, it reboots into runlevel 3 (console) and you get no GUI as you would expect. Obviously with only 200 packages installed, I doubted that any GUI would have been installed anyway and sure enough, startx confirmed that. yum to the rescue? Not quite!

I quickly discovered that I had no working network connection. ifconfig gave me only the loopback (lo) interface and a brief query told me that I had no networking packages installed at all. So I pop in the DVD and mount it, go into the Packages folder and start installing RPMs hoping to get networking working. Eventually, I got stuck in an endless loop of depsolving errors and gave up. The main culprit IIRC was libpolkit-gobject.

I momentarily give up and decide that I have no choice but to reinstall FC11, which turns out to be the solution to my problem. So here is what I did (exactly so I don’t know if variants would work).

  1. Clean install of FC11 (I used the LiveCD for a quick/minimal install)
  2. Changed the runlevel from 5 to 3 in /etc/inittab and rebooted
  3. yum install preugrade
  4. preupgrade-cli “Fedora 12 (Constantine)”
  5. reboot

All commands above ran as root. This put me into a text mode installer for FC12 which installed 1107 packages after which it automatically reboots as I found the machine waiting at the login prompt. So I log in, change back /etc/inittab from 3 to 5 and reboot once again.

I now have FC12 running as expected.

Categories: Linux Tags:
Get Adobe Flash playerPlugin by wpburn.com wordpress themes