JVM terminated exit code 13 2

Posted by admin on December 14, 2009

 

Spent a good time amount of time figuring, what this error is and still clueless.

I was able to run the latest version of eclipse after I degraded my eclipse and ran it and then ran the latest version.

What’s the logic ?

Accessing svn+ssh repository using TortoiseSVN 1

Posted by admin on February 01, 2009

TortoiseSVN could be a real pain, if you have to access a repository that is accessible via SSH since it pings for password every time.

Here are the steps to use your public/private key pair:

1. If you already have Putty generated public/private key pair then skip to next step, else if you are like me who use OpenSSH keys for everything then you need to run PUTTYGEN.EXE and import/convert your keys to Putty public/private key pair.
2. Run PAGEANT.EXE with path to your putty private key

Better you can add this shortcut (PAGEANT.EXE path_to_putty_private_key) to your start-up to auto-authorize for all sessions as you log in.

Update: Just realized that you will need to checkout the code-base prefixing your name else the PLink will ping each time for your name.

So, if your repository is located at say: svn+ssh://svn.codebase.com, check it out in the following manner:
svn+ssh://username@svn.codebase.com

PHP Uptime script for Windows 4

Posted by admin on January 19, 2009

1. Download the uptime tool from Microsoft.

2. Copy uptime.exe to windows folder (or you can set proper PATH)

3. Add the following code on your page:

<?php echo(shell_exec("uptime");) ?>

That’s it !

Finding windows uptime 7

Posted by admin on January 19, 2009

This little tool available from Microsoft, gives your uptime.

http://support.microsoft.com/kb/232243

Precise RSpec

Posted by admin on December 09, 2008

C:\Users\rd\Desktop\cucumber>spec bowling_spec.rb -f specdoc

Bowling
- test1
- test2
- test3

Finished in 0.0560000000000001 seconds

3 examples, 0 failures

Managing multiple ruby versions on windows 8

Posted by admin on December 08, 2008

Well I have to handle multiple ruby versions for different apps and change them frequently too.

So created a nifty script to change ruby versions on the fly.

# find installed ruby
Dir.chdir("C:/")
versions = Dir.glob("ruby*")[1..-1]
versions.each{|v| v.gsub!('ruby','')}
current_version = `ruby -v`
current_version_suffix = current_version.split[1].gsub('.','')
# handle mingw
if current_version =~ /mingw/
  current_version_suffix = 'win'
end

# generate menu
puts("current version: " + `ruby -v`)
puts("Installed ruby versions:")
versions.each_with_index { |v, i| p("#{i+1}. #{v}") }
print("Select number to change version, or enter to exit: ")
choice = gets.chop!
exit if choice.empty?

# rename
File.rename('c:\ruby', "ruby"+current_version_suffix)
File.rename("ruby"+versions[choice.to_i-1], 'c:\ruby')
puts("\n") if current_version_suffix =~ /19/ # for ruby 1.9
puts("changed version: " + `ruby -v`)

The above script is also available on pastie, http://pastie.org/334773

You can call it by creating shortcut for windows, like:

@ruby e:\shortcuts\change.rb

Update: Updated the script to take patchlevel in consideration:

# find installed ruby versions
Dir.chdir("c:/")
ruby_versions = Dir.glob("ruby*")[1..-1].each{|v| v.gsub!('ruby','')}
current_version_string = `ruby -v`
current_version_number = current_version_string.split[1].gsub('.','')
current_version_patchlevel = current_version_string.scan(/patchlevel\s?(\d+)/)
current_version = "#{current_version_number}p#{$1}"

# generate menu
puts("current version: #{current_version_string}")
puts("Installed ruby versions:")
ruby_versions.each_with_index { |v, i| puts("#{i+1}. #{v}") }
print("Select number to change version, or enter to exit: ")
choice = gets.chop!
exit if choice.empty?

# rename
File.rename('c:\ruby', "ruby"+current_version)
File.rename("ruby"+ruby_versions[choice.to_i-1], 'c:\ruby')
puts("changed version: #{`ruby -v`}")

Heredoc/here-document syntax 8

Posted by admin on December 08, 2008

Just because I forget this a lot when it’s needed the most.

http://keithdevens.com/weblog/archive/2005/Aug/17/heredoc

Fitt’s Law and Microsoft Office 8

Posted by admin on December 06, 2008

Nice read, regarding Fitt’s law related to user interface and it’s use in microsoft office.

http://blogs.msdn.com/jensenh/archive/2006/08/22/711808.aspx

Apps are evolving, for sure !

updating rubygems manually 1

Posted by admin on December 01, 2008

If you get “Nothing to update” when you try to update your rubygems and you’re sure your gems need to be updated.

Update them manually:

gem install rubygems-update
update_rubygems

check updated gems:

gem env

no such file to load — openssl

Posted by admin on November 30, 2008

Getting this ? simple you need to install the openssl package. Follow me:

sudo apt-get install libopenssl-ruby openssl
sudo apt-get install libssl-dev

Locate ruby source directory and browse to /ext/openssl and shoot the following:

sudo ruby extconf.rb
sudo make
sudo make install

relax :)