Open Terminal Quicker + Improve VLC

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article
Posted by John
on Sunday, 02 November 2008
Open Terminal via Keyboard Shortcuts

Open System / Preferences / Keyboard Shortcuts

Now find the one called Run a Terminal

Click on the column opposite saying disabled and hit CTRL+ALT+T, then close the dialog

Now everytime you hit CTRL+ALT+T a terminal window will open.

Improve VLC + Keyboard Shortcuts
CTRL+CURSOR-UP  => increase volume
CTRL+CURSOR-DOWN  => decrease volume
SPACEBAR  => pause movie

Also don't install the XINE packages, GStreamer is much faster for video playback

sudo apt-get remove xine
sudo apt-get autoremove

Also if you've got a slow video card, try changing the de-interlacing mode in VLC to discard via VLC / Video / Deinterlace / Discard.

If that doesn't work, try changing your Appearance settings to Normal via System / Preferences / Appearance, then Visual Effects and select Normal. It's a good balance and you'll still get the cube desktop.

...also found this which suggests using the blend deinterlacing mode to improve DVD playback,

gedit ~/.local/share/applications/vlc-dvd.desktop

Scroll down and find the line reading...

Exec=vlc %U

Replace that with...

Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 %f

Easy Work with Aliases

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article
Posted by John
on Monday, 17 December 2007

Nice little way to make operations easier for you.

In your .bash_profile file you can define command aliases to make light work of difficult tasks...

How ?

Start a Terminal session and open up your .bash_profile file with TextMate (or whatever text editor your want to use);

mate .bash_profile

Now add this to your .bash_profile;

alias jason='ssh root@mybox.com'

Now save & close that file, close Terminal and Open a new Terminal window.

And to Run it ?

Now everytime you run...

jason

It'll open a remote session to your box, cool, eh?

You can also expand this to fire off RSYNC tasks, system upgrades, whatever you want.

Accessing the Ruby RI dictionary

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article
Posted by John
on Friday, 10 August 2007

One of the major plus factors with Ruby and also all the extra gems is that they usually come with helpful documentation, both the RI and RDOC packages.

To access these is pretty simple, if a little daunting at first, from the Terminal.

ri Class

ri Class::method (:: for class mathods)

ri Class#method (# for instance methods)

The first line will return the RI dictionary definition and usage of the [class] you require, the second can be used to drill this down to the related [method] for the [class]

To use this, replace [class] & [method] with something like..

ri Enumerable

ri Enumerable#zip

…here the top line will return the definition & usage of the Enumerable class, the next will drill that down to a particular instance method.

You can also output this content to an HTML file via,

ri -Tf html String#gsub > gsub.html

…or to the Terminal using ANSI formatting

ri -Tf ansi String#gsub

…took this off a part of Why’s Poignant Guide to Ruby, hope to embelish this a bit further later.

John.