Just got my amazon associate store setup, not quite complete yet.
http://astore.amazon.co.uk/morgue-21
Twitter Updates
Friday, 10 July 2009
Thursday, 9 July 2009
Amazon.co.uk lists
Amazon seem to hide the link to create lists for list mania so here it is:
UK: http://www.amazon.co.uk/gp/richpub/listmania/createpipeline
US :http://www.amazon.com/gp/richpub/listmania/createpipeline
UK: http://www.amazon.co.uk/gp/richpub/listmania/createpipeline
US :http://www.amazon.com/gp/richpub/listmania/createpipeline
Monday, 6 July 2009
Disable jqs.exe on Windows
In my windows task manager I noticed a process called jqs.exe which had over 5,000,000,000 I/O Read Bytes the most out of any process on my computer by a factor of 4.
It is a java quick launch application which constantly brings a small part of java back in to main moemory. Sine I do not run java applications that often I do not mind a little bit of lag and followed the instructions here [1] to diable it
[1] http://jsbi.blogspot.com/2009/05/what-is-process-jqsexe-and-how-to.html
It is a java quick launch application which constantly brings a small part of java back in to main moemory. Sine I do not run java applications that often I do not mind a little bit of lag and followed the instructions here [1] to diable it
[1] http://jsbi.blogspot.com/2009/05/what-is-process-jqsexe-and-how-to.html
Saturday, 4 July 2009
Ruby Parsing Command Line Options
Ruby has built in methods for dealing with parsing command line options, it is called optparse.
optparse rdocs
some optparse examples
A Small example (cut down from the above) showing most common requirments.
Also on github.
optparse rdocs
some optparse examples
A Small example (cut down from the above) showing most common requirments.
Also on github.
#!/usr/bin/env ruby
require 'optparse'
require 'optparse/time'
require 'ostruct'
require 'pp'
class OptparseExample
#
# Return a structure describing the options.
#
def self.parse(args)
# The options specified on the command line will be collected in *options*.
# We set default values here.
options = OpenStruct.new
options.verbose = false
options.time = 0
options.delay = 0
options.leftovers = nil
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.separator ""
opts.separator "Specific options:"
# Boolean switch.
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options.verbose = v
end
# Cast 'time' argument to an integer.
opts.on("-t", "--time [TIME]", Integer, "Begin execution at given time") do |time|
options.time = time
end
# Cast 'delay' argument to a Float.
opts.on("--delay N", Float, "Delay N seconds before executing") do |n|
options.delay = n
end
# List of arguments.
opts.on("--list x,y,z", Array, "Example 'list' of arguments") do |list|
options.list = list
end
opts.separator ""
opts.separator "Common options:"
# No argument, shows at tail. This will print an options summary.
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
# Another typical switch to print the version.
opts.on_tail("--version", "Show version") do
#puts OptionParser::Version.join('.')
puts "Version 0.1.0"
exit
end
end
options.leftovers = opts.parse!(args)
options
end # parse()
end # class OptparseExample
options = OptparseExample.parse(ARGV)
pp options
puts ""
puts ""
puts options.leftovers
Saturday, 27 June 2009
Remove Parallels from Mac OS X
I used this article [1] to remove parallels from my Mac OS X 10.5 machine.
[1] http://kb.parallels.com/en/4709
Basically reload the .DMG used to install it. and run the remove app.
it also recommend removing these files manually (all of them were automatically deleted for me)
cd /Library/StartupItems/
sudo rm -rf Parallels
cd /Applications
sudo rm -rf Parallels
cd /System/Library/Extensions/
sudo rm -rf vmmain.kext
sudo rm -rf hypervisor.kext
sudo rm -rf Pvsvnic.kext
sudo rm -rf ConnectUSB.kext
sudo rm -rf Pvsnet.kext
NB: Remember SUDO will only work on Leopard OS X 10.5 when you have a password set.
Also I had some virtual machines that were very large in:
~/Documents/Parallels
and there was a shared folder created at:
/Users/Shared/Parallels
I deleted those 2 extra folders.
[1] http://kb.parallels.com/en/4709
Basically reload the .DMG used to install it. and run the remove app.
it also recommend removing these files manually (all of them were automatically deleted for me)
cd /Library/StartupItems/
sudo rm -rf Parallels
cd /Applications
sudo rm -rf Parallels
cd /System/Library/Extensions/
sudo rm -rf vmmain.kext
sudo rm -rf hypervisor.kext
sudo rm -rf Pvsvnic.kext
sudo rm -rf ConnectUSB.kext
sudo rm -rf Pvsnet.kext
NB: Remember SUDO will only work on Leopard OS X 10.5 when you have a password set.
Also I had some virtual machines that were very large in:
~/Documents/Parallels
and there was a shared folder created at:
/Users/Shared/Parallels
I deleted those 2 extra folders.
Labels:
Apple,
Filesystem,
Leopard,
Mac,
Microsoft,
MS,
OS X,
Parallels,
Ubuntu,
Virtual Machine,
Windows XP
Subscribe to:
Posts (Atom)

