How to Draw 3D Ring (Torus) With Vector Graphics (Tutorial)


Looks pretty cool, huh? I could only find a tutorial for how to draw a torus from the angle directly above it (here). But I wanted mine to be from a different angle, so I created this tutorial. I created this in Inkscape (it's free), but this should work fine for any vector graphics package (even photoshop). Just download the SVG file which contains the tutorial and example shapes at each stage of the creation.


The above link opens in Google Drive. From there, press Ctrl+S to save it to your computer so you can open it with Inkscape.

Hope it helps!

Super iGoogle

Google have updated the iGoogle page to look nicer. I've updated Super iGoogle to match the changes! Super iGoogle still works with the old version of iGoogle, if you don't have the new version, yet.

Here's the new description I published:

Super iGoogle compacts all of the unused space on your iGoogle page, making it neater, prettier and easier to use on small screens.

Hide any of the following from your iGoogle page:
  1. Header (space-consuming area at the top of the page)
  2. Sidebar tabs (a waste of space for some people)
  3. Footer (all the boring links at the bottom of the page)
You will find all settings for Super iGoogle in the menu at the top-right of your iGoogle page. Your settings will be automatically saved. Some settings have keyboard shortcuts, which are listed in the menu. Links to "change theme" and "add stuff" are also added to this menu.

If you want to hide the header to save space but you miss having the search-bar, a mini search-bar can be added to the top-right corner of the page.


Get the new Super iGoogle now!!

"Open With" Matlab—How-To for Linux

This post explains how to set .m (matlab source code files) to open with Matlab (a how-to for Gnome Linux).
  1. Right-click a .m file and click Properties
  2. Click the Open With tab then click Add
  3. Expand Use custom command and type the following into the field:
matlab -desktop -r "f=%f; cd(fileparts(f)); edit(f); clear f;"
  1. Click Add then select the radio button next to matlab.
  2. Close the property window.
Now all of your .m files should open with Matlab. The only thing I can't fix is that a new instance of Matlab is opened every time you open a .m file. To help, I set the current directory in Matlab to be that of the .m file which is being opened. Now you should be able to open your other .m files in Matlab more easily, without opening multiple instances.

If you'd like to know what that command does:

matlab: to run Matlab
-desktop: to run Matlab without using a terminal
-r: execute following matlab code when Matlab opens
f=%f: Save filename of file to open to variable f
cd(fileparts(f)): change the current directory to file f's directory
edit(f): open file f for editing
clear f: delete the matlab variable f

How To Shade Windows With Mouse Wheel

Scroll your mouse wheel in the up direction when your cursor is over the title-bar of a window. That window should now animate by sliding into the title-bar, therefore shading the window (assuming you're using CompizFusion). If this isn't the case, you can fix it by doing the following:
  1. Press Alt+F2
  2. Type gconf-editor
  3. Expand the aps folder (in the left column tree)
  4. Select the gwd folder
  5. Double click the mouse_wheel_action key in the right column
  6. Type shade into the value field
  7. Press OK and close the configuration editor. 
Thanks to the following forum post for this solution: UbuntuForums

Use Checkgmail with new Ubuntu Notifications

Short version:

Open a terminal and execute the following command in it:

sudo apt-get install checkgmail libnotify-bin && sudo wget http://users.cs.cf.ac.uk/R.P.Coombs/checkgmail -O /usr/bin/checkgmail

Now restart checkgmail. It will now display all new mail notifications using Ubuntu's new fancy-looking notifications. But don't worry, you can still open/archive etc. by hovering over the checkgmail icon as usual.

Long version:

I have modified CheckGmail to use Ubuntu's NotifyOSD notifications (see above pictures). I reckon this looks much better than the original little yellow box that CheckGmail uses.

My code does not affect the yellow box that appears when you hover over the CheckGmail icon, so you can still do this to preview / archive / open / etc. your emails.

You can run the command (above, in the short version) to install my modified CheckGmail program. The first part of the command (sudo apt-get install checkgmail libnotify) installs the original CheckGmail program (as this is required) and libnotify, which is what we'll use to display the new notifications.

The second part of the command (sudo wget http://users.cs.cf.ac.uk/R.P.Coombs/checkgmail -O /usr/bin/checkgmail) copied my program from the internet and saves it onto your computer in the place of the original CheckGmail program file.

My program is identical to the original program, except for the popup method. It is important that you trust my code before you install it onto your system as, if I were nasty, it could be malicious. I promise that I'm not malicious, but if you don't believe me you can view my code here and compare it with CheckGmail's original.

Once you have successfully executed the command you can start CheckGmail by running checkgmail, or, if checkgmail is already running, you must restart it by right-clicking the checkgmail notification-area icon and clicking restart.

P.s. this is another solution, which is better because it does not modify the original code:

http://helpforlinux.blogspot.com/2009/11/get-checkgmail-to-use-ubuntu.html

With a bit of work this could be great!

How to execute multiple commands in a launcher (shortcut) in Ubuntu

If you want a launcher (in the main menu or desktop etc) to perform more than one operation when clicked you might try using a launcher command like gedit; nautilus to open a text editor then a file browser. However, although this command will work in the terminal, it will not work in a launcher. Launchers can only execute one command. The workaround? ...read on:
  1. Open a terminal window
  2. Copy / paste the following code to the terminal:
    echo "echo \$@ > /tmp/runscript; chmod +x /tmp/runscript; /tmp/runscript" >> temp_launch; chmod +x temp_launch; sudo mv temp_launch /usr/bin/launch
  3. Press enter, then type your password when prompted
Now instead of using gedit; nautilus as your launcher command, use launch "gedit; nautilus". All commands between the speech marks will be executed.

Sorted!

How to crack DVDFab on Linux

Note: This original solution still works for me, but if you're having trouble then read the comments.

Note: In Ubuntu 10.10, Wine can't seem to find the CD drive anymore... As a workaround, open Configure Wine from your applications menu, click the Drives tab set the CD drive to point to your DVD disk folder (this is in /media/). You must do this every time you insert a new DVD as the name of the folder will change...

DVDFab is clearly the best DVD ripper. But £35 for one year's licence? I don't think so. And it sucks that the one feature I really care about (DVD9->DVD5) is only in the Platinum package. So, unfortunately I need to be cheeky. Btw, I would buy it if it was reasonably priced!

You get a 30 day free trial with DVDFab. I cannot find a crack that works on a Linux install of DVDFab so the best I have managed to do it to keep reseting the 30 day trial. To do this, simply run this line of code:

sed -i '/ASProtect/,/^$/d' ~/.wine/user.reg
Why not add this code to your DVDFab shortcut to restart the trial period every time you use DVDFab?! Simply use this code as your shortcut:
sed -i '/ASProtect/,/^$/d' ~/.wine/user.reg; env WINEPREFIX=~/.wine wine 'C:\Program Files\DVDFab 5\DVDFab.exe'
Note: The above code contains multiple commands. Launchers cannot run multiple commands. See the following post for a workaround to use this code in a launcher:
How to execute multiple commands in a launcher (shortcut) in Ubuntu