Archive for August, 2012

Start vuze with Java 7

August 22, 2012 Leave a comment

I installed Oracle Java 7 to /opt/java. When I start vuze and check Help -> About, it says it is still using Java 6. Hmm…

Edit the vuze launch script:

JAVA_PROGRAM_DIR="/opt/java/bin/"    # Add the trailing slash!
Categories: java Tags: ,

Auto Login to Windows 7

August 8, 2012 Leave a comment

I have a Windows 7 in VirtualBox. When I launch it, I don’t want to spend time with logging in. How to skip this step?

I found the solution here.

In short: launch netplwiz, in the Users tab, uncheck the box next to “Users must enter a user name and password to use this computer”, press Apply, provide the password, then OK, OK.

Categories: windows Tags: ,

Insert syntax highlighted source in Powerpoint

August 7, 2012 1 comment

You want to have syntax highlighted source in Powerpoint.

First, create an RTF file from the source:

pygmentize -f rtf -o hello.rtf

Open the RTF file in Word, select the source, then insert it in Powerpoint.

I made a basic script to automate the conversion. Usage:


The script is available here.

Update (20131030)
What if you want to insert colorized code in HTML?

$ pygmentize -f html -o index.html
$ pygmentize -f html -S default >style.css

The parameter of -S (here: default) is the name of the color scheme. Available color schemes:

>>> from pygments.styles import get_all_styles
>>> list(get_all_styles())
['monokai', 'manni', 'rrt', 'perldoc', 'borland', 'colorful', 'default', 'murphy', 'vs', 'trac', 'tango', 'fruity', 'autumn', 'bw', 'emacs', 'vim', 'pastie', 'friendly', 'native']

Then include style.css in index.html:

    <link rel="stylesheet" type="text/css" href="style.css">

August 7, 2012 Leave a comment

The project is an attempt to create an online environment for interactively exploring programming languages. It provides a fully-featured terminal emulator and code editor, powered by interpreter engines for more than 15 languages.

All our interpreters are written in (or compiled to) JavaScript, and run completely on the user’s device, regardless or whether it’s a desktop, laptop or phone.” (source)

FAQ here. And yes, they have Python.

Categories: web Tags:

Increase the size of a Virtualbox hard drive (.vdi)

August 3, 2012 Leave a comment

The following entry is based on this post.

I have a Linux host with a Windows 7 guest. The hard disk of the Windows guest was set to 30 GB but it got full. How could I extend its size to 40 GB for instance?

Locate the .vdi file of the virtual system. To be safe, make a backup copy of it. After that you can increase its size:

sudo VBoxManage modifyhd Windows7.vdi --resize 40000

Here Windows7.vdi is the name of my .vdi file and 40000 is given in megabytes, which is roughly 40 GB.

Now, if you boot the system and you verify the size of the C: drive, it will still be the old value. The increased size appears as a new unformatted and unused partition. You can join it with the C: partition the following way:

Go to the Control Panel, then System and Security, then Administrative Tools. Here you will see an icon called Computer Management. Start it. Choose Disk Management on the left side. Right click on drive C: and choose “extend volume“. It will be extended in a second. Done.

Update (20140427)
You can also start the Disk Management tool with the command diskmgmt.msc .

Update (20200415)
Under Windows 10 I ran into an issue. With VBoxManage I could increase the size of the virtual hard drive, and the extra space appeared as a new partition. However, Windows 10 has a recovery partition that was between the C: partition and the newly created free partition, thus I couldn’t join them.

I found the solution here: . In short: install the AOMEI Partition Assistant, which is a free partition manager. With this you can move the recovery partition after the newly created free partition, and then the C: partition and the newly created free partition can be merged. It worked flawlessly, but I highly suggest that you make a backup before this operation.

Powerpoint to PDF

August 2, 2012 Leave a comment

I just discovered that Microsoft Powerpoint 2007 supports PDF export. By default this plugin is not installed. Click on the Office button, and under Save as... there will be a menu point about exporting to PDF and XPS. Click on it and you will be redirected to a help file from where you can visit a download page of this export plugin. Once installed, this feature is available under Save as…

August 2, 2012 Leave a comment
Categories: Uncategorized Tags: ,