I have been using Linux Mint desktops recently, and I find these easy to use. The only part I dislike about them is the date in the calendar applet in the task bar. This should fix it:
%A %d/%m/%Y %l:%M %p
This will make the date time look like this:
Wednesday 25/09/2013 2:16 PM
Alternatively, I also like the look of:
%A %d.%m.%Y %l:%M %p
This will make the date time look like this:
Wednesday 25.09.2013 2:16 PM
ric_man's personal observations on Information Technology, Freedom, Open Source, Linux, Football, sneakers, and whatever...
Showing posts with label IT Stuff. Show all posts
Showing posts with label IT Stuff. Show all posts
Wednesday, 25 September 2013
Friday, 9 November 2012
Australian government backs down from internet filter
I have not written in this blog for a long time, as I have been busy recently, but something in the news has broken my "silence".
The good senator Conroy is now also the level-headed senator Conroy. In a win for anti-censorship, the Australian Government has backed down from implementing a nationwide internet filter. Instead they have asked for individual internet companies to block the most degenerate of all child pornography websites.
While this is a better idea than a nationwide filter, I do not know what it will target. I do not know of any public websites that deal with child pornography. It is not like you can search for the topic on the internet and find websites, where you can then purchase images or movies. Still, I welcome this move.
I have been following, and writing, about this topic for a long time. As a parent, I welcome that fact that the government is allowing me to take responsibility of raising my child in a way where he will have limitless access to knowledge, and with my assistance, also know what is right and wrong.
The good senator Conroy is now also the level-headed senator Conroy. In a win for anti-censorship, the Australian Government has backed down from implementing a nationwide internet filter. Instead they have asked for individual internet companies to block the most degenerate of all child pornography websites.
While this is a better idea than a nationwide filter, I do not know what it will target. I do not know of any public websites that deal with child pornography. It is not like you can search for the topic on the internet and find websites, where you can then purchase images or movies. Still, I welcome this move.
I have been following, and writing, about this topic for a long time. As a parent, I welcome that fact that the government is allowing me to take responsibility of raising my child in a way where he will have limitless access to knowledge, and with my assistance, also know what is right and wrong.
Labels:
"Fight da powah",
IT Stuff
Saturday, 21 April 2012
No more N900 - now onto Android
This week I sadly said goodbye to the Nokia N900. The N900 came out in 2009, and offered so much promise as to what a truly free open sourced phone could offer, but Nokia managed it to failure.
I got my N900 after I was introduced to it by Ax - back in 2010. He showed me his N900 with all the great features:
Regardless of their decisions, I stuck with the Nokia N900. I even purchased a second unit when my initial unit's micro USB port started to malfunction. KittyKat also had a N900, but made the jump to an Android phone (the Sony Ericsson Xperia X10) after she accidentally dropped the phone, and then ran over it. Little did she know she was paving the way for myself.
My second unit's micro USB port started to malfunction again, and I knew this was leading to an untimely end for the unit. It must have been a weak point of the phone, as I found out recently that Ax's N900 went down the same path. Ax is now using an Android phone as well.
What makes Android interesting is the fact it is also a Linux based phone. Unfortunately it does not have the initial freedom in-built to it like the N900 does, as the system is more locked down, but it does have the potential to be "root'ed". Therefore, it is goodbye to the N900 and hello to the Sony Ericsson Xperia pro. Fortunately, it has a slider keyboard, that is similar to the N900, the form is somewhat less clunky than the N900, and it has a 8.1 Megapixel camera.
In the first few days of using this new device has been interesting. I am still getting use to the new keyboard, and the new layout of the desktops, but otherwise it has made a good replacement.

I have already noticed there has been more applications written for the Android system than the Maemo system. This is evident in the Google Play site - the Android's market site. Another observation I have made is that Android multi-tasking is not as good as I have witnessed on the N900 - with the Android phone only really being able to background 6 applications. Other than that I am pleased with my new device, and if I do anything exceptional with it, I will write about it on this site.
I got my N900 after I was introduced to it by Ax - back in 2010. He showed me his N900 with all the great features:
- Keyboard slider design
- 5 Megapixel camera
- Linux (Maemo) as its Operating System
- No tedious technique to "root" the device
- Command line available
Regardless of their decisions, I stuck with the Nokia N900. I even purchased a second unit when my initial unit's micro USB port started to malfunction. KittyKat also had a N900, but made the jump to an Android phone (the Sony Ericsson Xperia X10) after she accidentally dropped the phone, and then ran over it. Little did she know she was paving the way for myself.
My second unit's micro USB port started to malfunction again, and I knew this was leading to an untimely end for the unit. It must have been a weak point of the phone, as I found out recently that Ax's N900 went down the same path. Ax is now using an Android phone as well.
What makes Android interesting is the fact it is also a Linux based phone. Unfortunately it does not have the initial freedom in-built to it like the N900 does, as the system is more locked down, but it does have the potential to be "root'ed". Therefore, it is goodbye to the N900 and hello to the Sony Ericsson Xperia pro. Fortunately, it has a slider keyboard, that is similar to the N900, the form is somewhat less clunky than the N900, and it has a 8.1 Megapixel camera.
In the first few days of using this new device has been interesting. I am still getting use to the new keyboard, and the new layout of the desktops, but otherwise it has made a good replacement.

I have already noticed there has been more applications written for the Android system than the Maemo system. This is evident in the Google Play site - the Android's market site. Another observation I have made is that Android multi-tasking is not as good as I have witnessed on the N900 - with the Android phone only really being able to background 6 applications. Other than that I am pleased with my new device, and if I do anything exceptional with it, I will write about it on this site.
Labels:
Android,
Image,
IT Stuff,
Nokia N900,
Open Source
Wednesday, 29 February 2012
Lower casing variables in DOS
Occasionally, I will need to use MS-DOS in my role at work. MS-DOS is one of the scripting languages to use while using Microsoft Windows operating system.
One of the problems with MS-DOS is that it is case-insensitive. MS-DOS does not distinguish the difference between upper case or lower case when using it. While this may not cause problems most circumstances while using Windows, it may potentially cause problems when interacting with other systems or programs.
I have used the following snippet of code to convert the %computername% variable, which was set as upper case to lower case. The result will be stored as %mycomputername%
echo>%computername%
dir /b/l %computername%>lower.tmp
set /p mycomputername=<lower.tmp
del lower.tmp
del %computername%
This snippet works by creating an empty file based on the variable that is in upper case. Then a directory listing is made, with the appropriate flags to list the output in lower case, and the output of this is stored in a file called lower.tmp. Then the contents of that file is read into the new variable. Finally the two temporary files are deleted.
I would have thought it would have been easier than that.
One of the problems with MS-DOS is that it is case-insensitive. MS-DOS does not distinguish the difference between upper case or lower case when using it. While this may not cause problems most circumstances while using Windows, it may potentially cause problems when interacting with other systems or programs.
I have used the following snippet of code to convert the %computername% variable, which was set as upper case to lower case. The result will be stored as %mycomputername%
echo>%computername%
dir /b/l %computername%>lower.tmp
set /p mycomputername=<lower.tmp
del lower.tmp
del %computername%
This snippet works by creating an empty file based on the variable that is in upper case. Then a directory listing is made, with the appropriate flags to list the output in lower case, and the output of this is stored in a file called lower.tmp. Then the contents of that file is read into the new variable. Finally the two temporary files are deleted.
I would have thought it would have been easier than that.
Labels:
IT Stuff
Friday, 10 February 2012
Upper and lower case in vim
I use vim for most of my text editing, especially with it comes to configuration and text files on UNIX / Linux machines, and there are times where I need to convert the entire file to uppercase or to lowercase. I find these two commands useful (when in command mode of vim):
:%s/[A-Z]/\L&/g
converts all uppercase characters to lowercase,
:%s/[a-z]/\U&/g
converts all lowercase characters to uppercase.
You could always toggle case characters using "~" as well.
:%s/[A-Z]/\L&/g
converts all uppercase characters to lowercase,
:%s/[a-z]/\U&/g
converts all lowercase characters to uppercase.
You could always toggle case characters using "~" as well.
Labels:
IT Stuff,
Open Source
Thursday, 19 January 2012
Websites on strike
As mentioned in a previous post I made on this blog, SOPA is being considered by the US government. Apparently it is being "shelved" for the moment. This has not stopped websites like Wired.com or Wikipedia (English version) from depicting a SOPA'ed web site:


While both "strikes" from web sites can be bypassed with browser settings, they do show what the websites could look like if SOPA was enacted.
SOPA is censorship. It will allow companies that feel threatened from loss of profits to accuse international web sites of piracy, and be able to block them. Seeing how the government of the USA has in the past had a mentality of "shoot first, questions later" (eg. weapons of mass destruction in Iraq never eventuating), it would be feasible to consider that web sites and businesses will be shut down pending further investigations.
For more information, have a look at the latimes article for a more comprehensive list of sites that are trying to fight this new form of censorship. If you are in the USA, do something about it - sign up on the petition with Google.
And for Australia - openinternet.com.au.
Everyone - do something (useful (now))!


While both "strikes" from web sites can be bypassed with browser settings, they do show what the websites could look like if SOPA was enacted.
SOPA is censorship. It will allow companies that feel threatened from loss of profits to accuse international web sites of piracy, and be able to block them. Seeing how the government of the USA has in the past had a mentality of "shoot first, questions later" (eg. weapons of mass destruction in Iraq never eventuating), it would be feasible to consider that web sites and businesses will be shut down pending further investigations.
For more information, have a look at the latimes article for a more comprehensive list of sites that are trying to fight this new form of censorship. If you are in the USA, do something about it - sign up on the petition with Google.
And for Australia - openinternet.com.au.
Everyone - do something (useful (now))!
Labels:
"Fight da powah",
Image,
IT Stuff
Sunday, 9 October 2011
Checking disk space on a UNIX / Linux machine
I have been looking for an all in one script that I can use to check on disk space on a UNIX / Linux machine, and if it past a certain percentage, email out a message to an email address informing about the result. I searched the web, and found a page called "Monitor UNIX / Linux Server Disk Space with Shell Script".
The code from that page looked good, but did not work properly on the Solaris machine I was trying it on - possibly due to some weird configurations in the command line shell. I made some modifications to the script, and hopefully have made it generically enough so it can be run on any UNIX / Linux system. The code is:
#!/usr/bin/sh
############################################################
# disk_test.sh
############################################################
# http://riconthego.blogspot.com/
############################################################
# This script is check disk space on a machine, and email
# out to a list of people if any file systems are on 90+% ############################################################
df -k|awk '{ print $5 " " $6 }' | while read output; do
usedPercentage=`echo $output | awk '{ print $1}' | cut -d'%' -f1 `
driveMount=`echo $output | awk '{ print $2 }' `
if [ $usedPercentage -gt 89 ]; then
echo "Running out of disk space \"$driveMount ($usedPercentage%)\" on `hostname` as of `date`" | mailx -s "Alert: Partition on `hostname` is at $usedPercentage%" someone@somewhere.com
fi
done
In the script, change the someone@somewhere.com argument passed into the mailx command to the email address that is the recipient of the information. Copy and paste the above code into a file called disk_test.sh, and then in the directory you saved the file in, type in the following command (without the "$" at the start):
$ chmod u+x disk_test.sh
This will change the permissions of the file allowing it to be executed as a script. Execute the script by typing the following command:
$ ./disk_test.sh
If everything has worked, you should not see any returned strings or characters to the console. If any of the partitions on the system meet the criteria in the test, a separate email should be sent for each mount that exceeds the threshold. Lastly, you should set up a periodic cron job, to automatically run the job on the filesystem. Depending on your requirements, you may want to run this script anywhere from once a week to once an hour.
The code from that page looked good, but did not work properly on the Solaris machine I was trying it on - possibly due to some weird configurations in the command line shell. I made some modifications to the script, and hopefully have made it generically enough so it can be run on any UNIX / Linux system. The code is:
#!/usr/bin/sh
############################################################
# disk_test.sh
############################################################
# http://riconthego.blogspot.com/
############################################################
# This script is check disk space on a machine, and email
# out to a list of people if any file systems are on 90+% ############################################################
df -k|awk '{ print $5 " " $6 }' | while read output; do
usedPercentage=`echo $output | awk '{ print $1}' | cut -d'%' -f1 `
driveMount=`echo $output | awk '{ print $2 }' `
if [ $usedPercentage -gt 89 ]; then
echo "Running out of disk space \"$driveMount ($usedPercentage%)\" on `hostname` as of `date`" | mailx -s "Alert: Partition on `hostname` is at $usedPercentage%" someone@somewhere.com
fi
done
In the script, change the someone@somewhere.com argument passed into the mailx command to the email address that is the recipient of the information. Copy and paste the above code into a file called disk_test.sh, and then in the directory you saved the file in, type in the following command (without the "$" at the start):
$ chmod u+x disk_test.sh
This will change the permissions of the file allowing it to be executed as a script. Execute the script by typing the following command:
$ ./disk_test.sh
If everything has worked, you should not see any returned strings or characters to the console. If any of the partitions on the system meet the criteria in the test, a separate email should be sent for each mount that exceeds the threshold. Lastly, you should set up a periodic cron job, to automatically run the job on the filesystem. Depending on your requirements, you may want to run this script anywhere from once a week to once an hour.
Labels:
IT Stuff,
Open Source
Friday, 7 October 2011
Setting up cron
Setting up recurring tasks in a Unix-like / Linux environment is done via a program / mechanism called cron. You edit it (usually) using vi, and you put in variables of when you are supposed to run jobs - similar to a scheduler. The order of those fields is something I always seem to forget, so here they are (to remind me to populate the top of the cron files):
# Minute Hour Day of Month Month Day of Week Command
# (0-59) (0-23) (1-31) (1-12 or Jan-Dec) (0-6 or Sun-Sat)
As an example:
0 2 12 * 0,6 /usr/bin/find /stuff
Putting those comments at the top of every cron file should be enough for others to figure out what is being done. To display cron jobs, type (without the "$"):
$ crontab -l
To edit cron jobs, type:
$ crontab -e
Remember to use vi commands when editing. The Gentoo Linux vi page is a really good start, or you can just go directly to the vi "cheat sheet".
# Minute Hour Day of Month Month Day of Week Command
# (0-59) (0-23) (1-31) (1-12 or Jan-Dec) (0-6 or Sun-Sat)
As an example:
0 2 12 * 0,6 /usr/bin/find /stuff
Putting those comments at the top of every cron file should be enough for others to figure out what is being done. To display cron jobs, type (without the "$"):
$ crontab -l
To edit cron jobs, type:
$ crontab -e
Remember to use vi commands when editing. The Gentoo Linux vi page is a really good start, or you can just go directly to the vi "cheat sheet".
Labels:
IT Stuff,
Open Source
Thursday, 6 October 2011
Uptime in MS Windows
I've been looking for a while to find a consistent way of finding uptime in Windows. It appears that Windows does not natively come with an uptime reporting program, even though you can install one (unlike Linux or other Unix-like systems). They do have other system commands, but you have to sift through the output of these programs to find out what information you want. From what I've seen, here is the most consistent commands:
Windows XP Professional:
To get the uptime of a system, start up a command window by clicking on Start -> Programs -> Accessories -> Command Prompt.
In the command prompt window, type in
systeminfo | find "Up Time"
and press Enter. This will isolate the line of information containing the uptime of the system.
Windows XP / 2000 / 2003:
Start up a command window by clicking on Start -> Programs -> Accessories -> Command Prompt.
In the command prompt window, type in
net statistics workstation | find "since"
and press Enter.
Linux / Unix:
It is much easier on a Unix / Linux type system, just to type in command line (without the "$"):
$ uptime
Windows XP Professional:
To get the uptime of a system, start up a command window by clicking on Start -> Programs -> Accessories -> Command Prompt.
In the command prompt window, type in
systeminfo | find "Up Time"
and press Enter. This will isolate the line of information containing the uptime of the system.
Windows XP / 2000 / 2003:
Start up a command window by clicking on Start -> Programs -> Accessories -> Command Prompt.
In the command prompt window, type in
net statistics workstation | find "since"
and press Enter.
Linux / Unix:
It is much easier on a Unix / Linux type system, just to type in command line (without the "$"):
$ uptime
Labels:
IT Stuff
Wednesday, 5 October 2011
Don't pick on the geek
This article has some references to Magic: The Gathering (MTG), but it serves only as a basis of a story of initial ridicule, but caught fire on the internet to drive a huge backlash from the internet users. You may have already guessed, but this is around the story of an internet website editor dating a MTG former champion - Alyssa Bereznak and Jon Finkel.
The dust has somewhat settle, and the internet has responded:
There is one thing that Alyssa, and I am guessing a lot of people (regardless of gender) are missing - without geeks or nerds, your world would be different - VERY DIFFERENT INDEED. You would not have:
I am not going to put forward the argument that the world is a better place with ALL these items in it, but I will say that it is a very different place. I am not saying that entertainers and sports people do not have their place in society either, but if you seriously think about it, being able to kick a ball does not assist in helping to solve communication issues between countries separated by geography. I do appreciate watching sports, but it is as a distraction. As Chewie said to me recently, "If it wasn't for all the distractions around us, we would get more time trying to solve things and better ourselves."
Next time you want to label something as "too nerdy" or "geeky", take a look around you and at your own life. If you are reading this article, it was because a nerd or a geek thought up the technology to bring it to you. Your mocking (no matter how "playful" or "innocent" it may be) may be having a profound negative impact on someone around you.
Well done to the internet community in raising one voice against people like mean girl Alyssa. And to Alyssa: "Your opinions are not always appreciated!"
The dust has somewhat settle, and the internet has responded:
- Apology to Jon Finkel from the Ladies of Geekland
- Alyssa Bereznak Just Reminded Us That Women Can Be Predators Online Too
- Gizmodo mean girl bashes OKCupid date for no reason
- Jon Finkel's wikipedia page with some vandalism in the opening paragraph
- The 8 Best Reactions To Gizmodo's Mean OkCupid Article
There is one thing that Alyssa, and I am guessing a lot of people (regardless of gender) are missing - without geeks or nerds, your world would be different - VERY DIFFERENT INDEED. You would not have:
- Industries built on Information Technology (IT)
- The internet (ie. you would not be able to read this blog post) and its websites
- Computers
- Mobile Phones (and this would probably extend to regular phones)
- Television
- Radio
- Medicines
- Electricity
- Food technology (although some may argue that genetically modified food is harmful)

- Video games
- Credit cards
- Cars and most other forms of transport
- Everything cool that Apple makes (iPhone, iPad, iMac)
- Countless other items
I am not going to put forward the argument that the world is a better place with ALL these items in it, but I will say that it is a very different place. I am not saying that entertainers and sports people do not have their place in society either, but if you seriously think about it, being able to kick a ball does not assist in helping to solve communication issues between countries separated by geography. I do appreciate watching sports, but it is as a distraction. As Chewie said to me recently, "If it wasn't for all the distractions around us, we would get more time trying to solve things and better ourselves."
Next time you want to label something as "too nerdy" or "geeky", take a look around you and at your own life. If you are reading this article, it was because a nerd or a geek thought up the technology to bring it to you. Your mocking (no matter how "playful" or "innocent" it may be) may be having a profound negative impact on someone around you.
Well done to the internet community in raising one voice against people like mean girl Alyssa. And to Alyssa: "Your opinions are not always appreciated!"
Labels:
Card Games,
IT Stuff
Monday, 26 September 2011
Microsoft is stifling your freedoms (again!)
This article was originally sent out on the Linux Users of Victoria (LUV) mailing list by Luke. After emailing Luke, he has release the below (with some of my alterations) as public domain:
It as part of the Windows 8 OEM scheme Microsoft requires the OEM's to lock down the computer to only run Windows 8 or other "authorized" OS'es via a signature system for "security" reasons.
Put simply, Microsoft as part of their OEM system require all new computers shipping with Windows 8 to use secure signing keys to prevent "unauthorized software" from running on the computer. This will prevent all free software operating systems from running on the computers that come with OEM by default.
So, we need YOU to stand up for Linux in Australia (and other countries)!
Simply follow these easy steps:
Here is the reference letter:
To ACCC,
I have recently learned that any new computer or laptop that ships with the upcoming Windows 8 Operating System will not be able to run any other Operating System. Microsoft's new UEFI Secure Boot system prevents 'unauthorized software' from running on any new computer sold with Windows 8. Making a system that ships with only Microsoft Windows not being able to boot a copy of Linux or any other operating system. I wish to use Linux on future computers, and this will not allow me to use Linux at all. Microsoft is engaging in seriously anti-competitive behavior by forcing the lockout of all competitors - see: http://www.itwire.com/opinion-and-analysis/open-sauce/49889-will-windows-8-succeed-in-locking-out-gnulinux
Not only will Microsoft kick out Linux off the computers, they will prevent 'upgrading' of windows versions: creating forced obsolescence. I am disgusted, is Microsoft legally allowed to do this? Microsoft has been slowly becoming more anti-competitive: computing used to be about choice, having the ability to choose the Operating System. Now Microsoft want to have complete control.
Regards,
[insert your name here]
Do something (now) about protecting your freedoms! And if you want to read more, try the originating opinion in itwire.
It as part of the Windows 8 OEM scheme Microsoft requires the OEM's to lock down the computer to only run Windows 8 or other "authorized" OS'es via a signature system for "security" reasons.
Put simply, Microsoft as part of their OEM system require all new computers shipping with Windows 8 to use secure signing keys to prevent "unauthorized software" from running on the computer. This will prevent all free software operating systems from running on the computers that come with OEM by default.
So, we need YOU to stand up for Linux in Australia (and other countries)!
Simply follow these easy steps:
- Click this link: here
- Fill out your concerns (find a reference letter below that you are free to copy / use).
- Submit with Personal Information (this is a real complaint, and the ACCC requires this information to possibly verify it is legitimate).
- Tell your friends to do the same.
- (optional) Forward this to your favorite Linux Mailing List.
- (optional) Phone the ACCC on 1300 302 502.
Here is the reference letter:
To ACCC,
I have recently learned that any new computer or laptop that ships with the upcoming Windows 8 Operating System will not be able to run any other Operating System. Microsoft's new UEFI Secure Boot system prevents 'unauthorized software' from running on any new computer sold with Windows 8. Making a system that ships with only Microsoft Windows not being able to boot a copy of Linux or any other operating system. I wish to use Linux on future computers, and this will not allow me to use Linux at all. Microsoft is engaging in seriously anti-competitive behavior by forcing the lockout of all competitors - see: http://www.itwire.com/opinion-and-analysis/open-sauce/49889-will-windows-8-succeed-in-locking-out-gnulinux
Not only will Microsoft kick out Linux off the computers, they will prevent 'upgrading' of windows versions: creating forced obsolescence. I am disgusted, is Microsoft legally allowed to do this? Microsoft has been slowly becoming more anti-competitive: computing used to be about choice, having the ability to choose the Operating System. Now Microsoft want to have complete control.
Regards,
[insert your name here]
Do something (now) about protecting your freedoms! And if you want to read more, try the originating opinion in itwire.
Labels:
"Fight da powah",
IT Stuff,
Open Source
Wednesday, 3 August 2011
IE users not that smart
In an interesting article on mashable.com - it appears that users of Microsoft's Internet Explorer have a lower IQ than users of other browsers.
Who would have thought this?
I do not know of how reputable the survey was, but I offer some insight to the article's findings. If you make something for the masses, by the law of averages, you are going to have a mix of smart people, average people, and not so smart people use it. This will "even" out any sample and mean that what you have is a typical indication of IQ in this case. Make something more obscure, and not readily available, and only people that read and are willing to learn will try things.
Therefore, it may make some sense that Microsoft's IE average users are lower in IQ (over a large survey spread), than people that use Firefox, Chrome, or even Opera, and Camino.
The best thing this survey does show is that we are not forced to use only one browser, but everyone has a choice.
Apparently, the survey has been labelled as a hoax, but it still has me appreciating browser choice!
Who would have thought this?
I do not know of how reputable the survey was, but I offer some insight to the article's findings. If you make something for the masses, by the law of averages, you are going to have a mix of smart people, average people, and not so smart people use it. This will "even" out any sample and mean that what you have is a typical indication of IQ in this case. Make something more obscure, and not readily available, and only people that read and are willing to learn will try things.
Therefore, it may make some sense that Microsoft's IE average users are lower in IQ (over a large survey spread), than people that use Firefox, Chrome, or even Opera, and Camino.
The best thing this survey does show is that we are not forced to use only one browser, but everyone has a choice.
Apparently, the survey has been labelled as a hoax, but it still has me appreciating browser choice!
Labels:
"Fight da powah",
IT Stuff
Wednesday, 13 July 2011
Another person's view on WebSphere
As some of you may know, I work with computer "thingies", and this will usually involve me working with application servers. While not the most fun of all roles, it is interesting enough to keep me involved.
Recently, Chewie has gotten involved, and has started his own blog on doing WebSphere - WebSphere being a Java application server from IBM.
I look forward to seeing what he has to write up...
Recently, Chewie has gotten involved, and has started his own blog on doing WebSphere - WebSphere being a Java application server from IBM.
I look forward to seeing what he has to write up...
Labels:
IT Stuff
Tuesday, 5 July 2011
Australian Internet filter is easily bypassed
The good Senator Conroy is in the belief that he is still doing the correct thing - trying to save Australian net users from the dangers and disgust of an unregulated Internet. Even though he looks like he may be blocked in the Australian Senate, I believe he is still trying to advance his agenda for an internet filter for Australia - and still going ahead with rollout.
The rollout on Optus has an interesting twist in this story. The filter can be defeated by changing the DNS server in the operating system.
The news of bypassing the filter irritates me. A lot! The reason being is that I would have thought that to bypass the internet filter would require some fancy manipulation and installation of some interesting proxying software - not something a child or teenager can do in under 30 seconds. This is a multi-million dollar system, that can be bypassed with the simplest of ease. And this multi-million dollar filter is going to slow the internet down for all other users. The filter is useless and a huge waste of money, and just like the carbon tax, it will be paid for by Australian taxpayers.
If this article has inspired anything within you, please click on the link below and try to do something about it.
Do something (useful) now!
The rollout on Optus has an interesting twist in this story. The filter can be defeated by changing the DNS server in the operating system.
The news of bypassing the filter irritates me. A lot! The reason being is that I would have thought that to bypass the internet filter would require some fancy manipulation and installation of some interesting proxying software - not something a child or teenager can do in under 30 seconds. This is a multi-million dollar system, that can be bypassed with the simplest of ease. And this multi-million dollar filter is going to slow the internet down for all other users. The filter is useless and a huge waste of money, and just like the carbon tax, it will be paid for by Australian taxpayers.
If this article has inspired anything within you, please click on the link below and try to do something about it.
Do something (useful) now!
Labels:
"Fight da powah",
IT Stuff
Monday, 6 June 2011
Over-engineering and sales in IT
I see so much over-engineering in my work while I work in the IT field. People have decided on products based on sales people coming in, showing a fantastical presentation, and then get sold on a product that will meet their needs (with the promise of having enough features to make it "future-proof"). In some instances, this may work. In many it fails.
In times like this, I reflect on an article which was written back in 2005 to address allegations that open source cannot compete with proprietary enterprise ready applications (usually the ones that are over-engineered) - Ryan Tomayko's article: IBM Poopheads: "LAMP Users Need to Grow Up".
I suggest that all decision makers in all organizations, regardless where you are on the corporate ladder, has a read of the article and draws their own conclusions. Have a read of the attached comments, and feel free to voice your opinions either there or on this blog.
In times like this, I reflect on an article which was written back in 2005 to address allegations that open source cannot compete with proprietary enterprise ready applications (usually the ones that are over-engineered) - Ryan Tomayko's article: IBM Poopheads: "LAMP Users Need to Grow Up".
I suggest that all decision makers in all organizations, regardless where you are on the corporate ladder, has a read of the article and draws their own conclusions. Have a read of the attached comments, and feel free to voice your opinions either there or on this blog.
Labels:
IT Stuff,
Open Source
Friday, 20 May 2011
Piping programs in shell
When I started to write this thread of articles on shell scripting, I did not know where it would lead me. I just started writing to try and cover what I knew about scripting, and how I have applied it. During this, I have written about:
The next bit I want to cover is about the toy block like structure of this type of language. You can build programs on top of other programs, and then "pipe" their output from one to another. Piping (also known as the verticle bar - "|" ) is a way of chaining output from one program in as the input for another program. Here is the shell script:
$ cat new.sh
#!/usr/bin/sh
echo This is a find on the test directory:
find test/ -print
echo ""
echo This is the same find, being passed through to grep to only find stuff ending with txt
find test/ -print | grep txt$
The first line defines this as a shell script. The second line prints the words "This is a find on the test directory" to the screen. The third line runs the find program on the test directory, and outputs the contents to the screen. The forth line line prints a blank line. The fifth line prints the line "This is the same find, being passed through to grep to only find stuff ending with txt". The sixth line is similar tot he third line, but before outputting the data to the screen, passes it via the grep filter (by the pipe character) to only print out lines that end with txt. I saved the file as new.sh, and running it produces:
$ ./new.sh
This is a find on the test directory:
test/
test/CheckThis.pl
test/servers.txt
test/CheckThat.pl
test/CheckSomethingElse.pl
test/web_pages.txt
This is the same find, being passed through to grep to only find stuff ending with txt
test/servers.txt
test/web_pages.txt
As a side note, while this script is straight forward, it introduces two new programs - being find and grep. Find, as its name suggests, finds files on a filesystem (it behaves differently on a Windows system). Grep is different. It is a filtering tool based on regular expressions. A regular expressions is a way to match strings. I could write an entire book on how to master regular expressions - there is so many combinations and permutations on how to write them. If you are interested in doing more with regular expressions, have a look at the Mastering Regular Expressions site.
The next bit I want to cover is about the toy block like structure of this type of language. You can build programs on top of other programs, and then "pipe" their output from one to another. Piping (also known as the verticle bar - "|" ) is a way of chaining output from one program in as the input for another program. Here is the shell script:
$ cat new.sh
#!/usr/bin/sh
echo This is a find on the test directory:
find test/ -print
echo ""
echo This is the same find, being passed through to grep to only find stuff ending with txt
find test/ -print | grep txt$
The first line defines this as a shell script. The second line prints the words "This is a find on the test directory" to the screen. The third line runs the find program on the test directory, and outputs the contents to the screen. The forth line line prints a blank line. The fifth line prints the line "This is the same find, being passed through to grep to only find stuff ending with txt". The sixth line is similar tot he third line, but before outputting the data to the screen, passes it via the grep filter (by the pipe character) to only print out lines that end with txt. I saved the file as new.sh, and running it produces:
$ ./new.sh
This is a find on the test directory:
test/
test/CheckThis.pl
test/servers.txt
test/CheckThat.pl
test/CheckSomethingElse.pl
test/web_pages.txt
This is the same find, being passed through to grep to only find stuff ending with txt
test/servers.txt
test/web_pages.txt
As a side note, while this script is straight forward, it introduces two new programs - being find and grep. Find, as its name suggests, finds files on a filesystem (it behaves differently on a Windows system). Grep is different. It is a filtering tool based on regular expressions. A regular expressions is a way to match strings. I could write an entire book on how to master regular expressions - there is so many combinations and permutations on how to write them. If you are interested in doing more with regular expressions, have a look at the Mastering Regular Expressions site.
Labels:
IT Stuff,
Open Source,
Shell Scripting
Wednesday, 11 May 2011
Conditional scripting
When you break programming down, regardless what language or syntax it is written or developed in, the basis of a piece of code is how it handles a condition.
What happens when you have something? How do you handle it? What do you do with it?
The absolute basic conditional statement in shell scripting is the "if" statement. The basics of the if is that "if the conditions are met, then do something". To be fancier, you can also add "else". Here is an example:
#!/usr/bin/sh
variable1=Hello;
variable2=Goodbye;
echo "Let's start!";
if [ "$variable1" = "$variable2" ]; then
echo "The salutations are the same!";
else
echo "The salutations are not the same!";
fi
variable2=Hello;
echo "";
echo "Let's try again!";
if [ "$variable1" = "$variable2" ]; then
echo "The salutations are the same!";
else
echo "The salutations are not the same!";
fi
This simple script sets up 2 variables, and the compares them. In the second paragraph, it changes the second variable to be the same as the first variable, and runs the same if statement test on them again. The output looks like:
$ ./test.sh
Let's start!
The salutations are not the same!
Let's try again!
The salutations are the same!
While not very exciting, you can do many different types of data. Keep in mind that comparing text is different from comparing data. More comparison tests can be found here.
Lastly, I would like to mention that you can put a shell script into a type of "debug" mode where it will output more verbose information while it is running. This is by changing the first line of the script from:
#!/usr/bin/sh
to
#!/usr/bin/sh -x
Now the output looks like:
$ ./test.sh
variable1=Hello
variable2=Goodbye
+ echo Let's start!
Let's start!
+ [ Hello = Goodbye ]
+ echo The salutations are not the same!
The salutations are not the same!
variable2=Hello
+ echo
+ echo Let's try again!
Let's try again!
+ [ Hello = Hello ]
+ echo The salutations are the same!
The salutations are the same!
Good luck with your scripting, and I welcome any comments or queries.
What happens when you have something? How do you handle it? What do you do with it?
The absolute basic conditional statement in shell scripting is the "if" statement. The basics of the if is that "if the conditions are met, then do something". To be fancier, you can also add "else". Here is an example:
#!/usr/bin/sh
variable1=Hello;
variable2=Goodbye;
echo "Let's start!";
if [ "$variable1" = "$variable2" ]; then
echo "The salutations are the same!";
else
echo "The salutations are not the same!";
fi
variable2=Hello;
echo "";
echo "Let's try again!";
if [ "$variable1" = "$variable2" ]; then
echo "The salutations are the same!";
else
echo "The salutations are not the same!";
fi
This simple script sets up 2 variables, and the compares them. In the second paragraph, it changes the second variable to be the same as the first variable, and runs the same if statement test on them again. The output looks like:
$ ./test.sh
Let's start!
The salutations are not the same!
Let's try again!
The salutations are the same!
While not very exciting, you can do many different types of data. Keep in mind that comparing text is different from comparing data. More comparison tests can be found here.
Lastly, I would like to mention that you can put a shell script into a type of "debug" mode where it will output more verbose information while it is running. This is by changing the first line of the script from:
#!/usr/bin/sh
to
#!/usr/bin/sh -x
Now the output looks like:
$ ./test.sh
variable1=Hello
variable2=Goodbye
+ echo Let's start!
Let's start!
+ [ Hello = Goodbye ]
+ echo The salutations are not the same!
The salutations are not the same!
variable2=Hello
+ echo
+ echo Let's try again!
Let's try again!
+ [ Hello = Hello ]
+ echo The salutations are the same!
The salutations are the same!
Good luck with your scripting, and I welcome any comments or queries.
Labels:
IT Stuff,
Open Source,
Shell Scripting
Tuesday, 3 May 2011
Basic variable creation in shell
In my last article on basic shell scripting, I did the universal hello world program. This time around, I will discuss making variables.
A variable is a symbolic name for information. You can call a variable nearly anything in unix shell scripting. There are some exceptions though. Here is the simple program outlining variables:
#!/usr/bin/sh
salutation=Hi;
name=Fred;
echo $salutation $name;
echo "";
echo salutation name;
The first line describes this program as a shell script. The second line assigns the value of "Hi" to the variable of salutation. The third line assigned the value of "Fred" to the variable of name. The forth line outputs the two variable values. This is done by using the "$" in front of the variable name. The fifth line prints out a blank line. The sixth line is only for comparison of what the fourth line would have looked like if it did not have the "$". I have saved the contents of the file to a file called "test.sh" and made it executable. The output is:
$ ./test.sh
Hi Fred
salutation name
That is as easy as variables can get. You can store text and letters in variables, as well as strings. With some clever delimiting, you can also turn these variables into mini lists - similar to arrays in other more advanced forms of programming.
I will attempt to write up how to do some basic comparisons in my next article on scripting. I am also welcome to suggestions via the comments of this post.
A variable is a symbolic name for information. You can call a variable nearly anything in unix shell scripting. There are some exceptions though. Here is the simple program outlining variables:
#!/usr/bin/sh
salutation=Hi;
name=Fred;
echo $salutation $name;
echo "";
echo salutation name;
The first line describes this program as a shell script. The second line assigns the value of "Hi" to the variable of salutation. The third line assigned the value of "Fred" to the variable of name. The forth line outputs the two variable values. This is done by using the "$" in front of the variable name. The fifth line prints out a blank line. The sixth line is only for comparison of what the fourth line would have looked like if it did not have the "$". I have saved the contents of the file to a file called "test.sh" and made it executable. The output is:
$ ./test.sh
Hi Fred
salutation name
That is as easy as variables can get. You can store text and letters in variables, as well as strings. With some clever delimiting, you can also turn these variables into mini lists - similar to arrays in other more advanced forms of programming.
I will attempt to write up how to do some basic comparisons in my next article on scripting. I am also welcome to suggestions via the comments of this post.
Labels:
IT Stuff,
Open Source,
Shell Scripting
Thursday, 17 March 2011
Feds bust child "paedo" ring
According to the news, the Australian Federal Police (AFP) have infiltrated and broken up a child pornography / pedophile group. Well done to the AFP!! I'm being serious here. Well done to the AFP!!
These criminals are actually exploiting people, ruining families, and causing physical and mental damage to future. I know of people that have been on the receiving end of being abused as a child, and while the physical damage did not last long, the mental damage was still there - even 20+ years on.
So, once again, well done to the AFP!!
The reason I bring this up, is that it was done without the cleanfeed internet filter. I hope the good Senator Conroy is paying attention to this. Apparently, twitter users have - "Didn't need a filter for the AFP to do all this work, did they Mr Conroy? http://bit.ly/hbDbpJ #openinternet #nocleanfeed".
These criminals are actually exploiting people, ruining families, and causing physical and mental damage to future. I know of people that have been on the receiving end of being abused as a child, and while the physical damage did not last long, the mental damage was still there - even 20+ years on.
So, once again, well done to the AFP!!
The reason I bring this up, is that it was done without the cleanfeed internet filter. I hope the good Senator Conroy is paying attention to this. Apparently, twitter users have - "Didn't need a filter for the AFP to do all this work, did they Mr Conroy? http://bit.ly/hbDbpJ #openinternet #nocleanfeed".
Labels:
"Fight da powah",
IT Stuff
Friday, 11 March 2011
Continually gathering stats in WebSphere
I sometimes work with IBM's WebSphere Application server, and there is times I need to see what it is doing. In most of the places I have worked in, there is usually a set of monitoring tools. In some cases, there are no tools, and I will need to gather the statistics yourself.
For those circumstances on UNIX, I can point you to Michael Milani's page on "Gathering PMI Data from WAS using wsadmin Scripting".
For the same solution on Windows, you may want to use this wrapper script (can be named anything.bat):
As long as you use the PmiInfo.jacl script Michael set up, it should gather the stats you need and log them to a file. Change "machine01" the name of the machine you are connecting to. Ensure you have access to wsadmin.bat - you may need to change the path. You should now be able to execute this script, and it will run indefinitely until you cancel it.
For those circumstances on UNIX, I can point you to Michael Milani's page on "Gathering PMI Data from WAS using wsadmin Scripting".
For the same solution on Windows, you may want to use this wrapper script (can be named anything.bat):
echo Off
FOR /f "tokens=1-8 delims=:/-,. " %%i in ('echo exit^|cmd /q /k"prompt $D $T"') do (
For /f "tokens=2-4 delims=/-,() skip=1" %%a in ('echo.^|date') do (
set dow=%%i
set %%a=%%j
set %%b=%%k
set %%c=%%l
set hh=%%m
set min=%%n
set ss=%%o
set cs=%%p
)
)
SET DATESTAMP=%yy%%mm%%dd%
SET TIMESTAMP=%hh%%min%%ss%
SET OUTFILE=collectstats_%DATESTAMP%%TIMESTAMP%.log
echo "Script started at:"
date /t
time /t
:TOP
FOR /f "tokens=1-8 delims=:/-,. " %%i in ('echo exit^|cmd /q /k"prompt $D $T"') do (
For /f "tokens=2-4 delims=/-,() skip=1" %%a in ('echo.^|date') do (
set dow=%%i
set %%a=%%j
set %%b=%%k
set %%c=%%l
set hh=%%m
set min=%%n
set ss=%%o
set cs=%%p
)
)
SET DATESTAMP=%yy%%mm%%dd%
SET TIMESTAMP=%hh%%min%%ss%
echo %DATESTAMP%-%TIMESTAMP% >> %OUTFILE%
echo ------------------------------------------------- >> %OUTFILE%
call C:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\wsadmin.bat -lang jacl -f PmiInfo.jacl machine01 jvm >> %OUTFILE%
call C:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin\wsadmin.bat -lang jacl -f PmiInfo.jacl machine01 threadpool >> %OUTFILE%
echo ------------------------------------------------->> %OUTFILE%
echo "Pausing for 30 seconds..."
CHOICE /N /C Y /T 30 /D Y >NUL
Shift
Goto TOP
As long as you use the PmiInfo.jacl script Michael set up, it should gather the stats you need and log them to a file. Change "machine01" the name of the machine you are connecting to. Ensure you have access to wsadmin.bat - you may need to change the path. You should now be able to execute this script, and it will run indefinitely until you cancel it.
Labels:
IT Stuff
Subscribe to:
Posts (Atom)
