The Standard Output

One man's standard output is another man's standard input!

Archive for the ‘coolstuff’ tag

Bill Murray to win an Oscar

without comments

This is off-topic for this venue and the fact that I decided to include it says a lot about how strongly I feel: I just watched the trailer for the upcoming movie Hyde Park on Hudson, starring Bill Murray as F.D.R., and based on that alone, I am hereby predicting that Mr. Murray will win an Academy Award for the performance.

Written by Jonas Gorauskas

December 11th, 2012 at 11:54 pm

Posted in Review/Commentary,Zeitgeist

Tagged with

Heard on Twitter…

without comments

If you aren’t willing to learn,
No one can help you.
If you are determined to learn,
No one can stop you.


Ted Neward (@tedneward), [+] Wed 22 Aug 2012 14:52

Written by Jonas Gorauskas

August 23rd, 2012 at 12:11 am

How to use Emacs key bindings in Visual Studio 2010

with 2 comments

Visual Studio 2008 used to have a Emacs key mapping scheme that you could pick from the Options dialog under the Keyboard options. Visual Studio 2010 did away with that key mapping scheme.

VS2010 Keyboard Mapping Schemes

But those emacs enthusiasts among us who use Visual Studio should not fear… There is now an Emacs Emulation extension available for VS2010 that you can install via the Extensions Manager under the Tools menu.

Installation

To install the Emacs Emulation extension, follow these steps:

VS2010 Extensions Manager

  1. Open Visual Studio 2010
  2. Go to the Tools menu
  3. Select the Extension Manager
  4. On the Extension Manager dialog, select Online Gallery
  5. Search the Online Gallery for Emacs (top right)
  6. Select and install the Emacs Emulation package
  7. Restart Visual Studio 2010
  8. From the Options dialog, the Emacs key mapping scheme is now available

VS2010 Emacs Keyboard Mapping Scheme

Beyond the default Emacs key bindings, the ones that I find most useful are the following:

Command Keys Description
Edit.EmacsExtendedCommand ALT + X Places the cursor in the Find/Command box on the Standard toolbar.
Edit.EmacsFindReplace SHIFT + ALT + 5 Displays the replace options in the Quick tab of the Find and Replace dialog box.
Edit.EmacsSwapPointAndMark CTRL + X, CTRL + X Moves the cursor to the current mark in the location stack and moves the current mark to the location where the cursor mark was when the command was invoked.
Edit.EmacsCloseOtherWindow CTRL + X, 1 When a window is split, this shortcut closes the pane that does not have focus.
Edit.EmacsSplitVertical CTRL + X, 2 Splits the current document in half vertically. The current line of code is centered in each window.

… and that’s all, folks!

Written by Jonas Gorauskas

July 7th, 2012 at 8:33 pm

Posted in Emacs,Programming

Tagged with , ,

An Emacs Birthday Present

without comments

There is a little known amusement in Emacs that you can use on your loved ones:

  1. For maximum effect, ensure the loved one is looking over your shoulder.
  2. Open emacs
  3. Enter the command: M-x animate-birthday-present
  4. Provide your loved one’s name and …
  5. Voila! Watch the magic happen…

To find out more about it, describe the function (C-h v animate-birthday-present) or look in animate.el. Have lots of fun…

Written by Jonas Gorauskas

June 20th, 2012 at 9:40 pm

Posted in Emacs,Quick Hacks

Tagged with ,

Links for 2011-07-19

without comments

Written by Jonas Gorauskas

July 19th, 2011 at 11:40 am

Posted in Zeitgeist

Tagged with ,

Problems

without comments

A clever person solves a problem. A wise person avoids it.

– Einstein


Written by Jonas Gorauskas

July 5th, 2011 at 12:00 am

Posted in Great Quotes

Tagged with ,

Links for 2011-06-01

without comments

Written by Jonas Gorauskas

June 1st, 2011 at 7:44 pm

Posted in Zeitgeist

Tagged with ,

Links for 2011-05-29

without comments

Written by Jonas Gorauskas

May 29th, 2011 at 8:54 pm

Posted in Zeitgeist

Tagged with ,

VirtualBox on Debian-based distros

with one comment

There is a really great write up on how to install and maintain the latest Oracle VirtualBox package on a Debian-based Linux distribution.

Here are the steps in a nutshell:

  1. Add a line to the /etc/apt/sources.list file:

    deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
    
  2. Download and add the Oracle public key:

    wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
    
  3. Install VirtualBox:

    sudo apt-get update
    sudo apt-get install virtualbox-4.0
    

That’s basically it… Do refer to the link above for extra details and some caveats.

Written by Jonas Gorauskas

May 27th, 2011 at 10:35 pm

Restoring Installed Packages in Debian

without comments

I have an older laptop that runs Ubuntu Linux and one of the issues that comes up regularly is that Ubuntu releases a new version every 6 months and I usually flatten the disks on that machine and do a fresh install. The base system is great and very usable, but there are several packages that I install manually after the fact, most of them being programming tools. There is a quick way for you to list out all installed packages and then restore them after upgrading and I will cover that technique here.

Note: The instructions listed here are for Debian based distributions that use .deb based packages.

Backing up a list of installed packages

In order to list out all installed packages and save them to a text file, you can do this from the shell:

$ dpkg --get-selections > installed-packages.txt

Let’s deconstruct the above command:

  • dpkg is the Debian package manager
  • --get-selections is the parameter or action that lists all the currently installed packages. You can also pass a pattern to this action to generate different types of package lists. Look at the man pages for details.
  • > textfilename.txt will redirect the standard output to the text file specified.

Restoring the list of installed packages

When you need to restore the installed packages from a previous state, you can run the following command from the shell:

$ dpkg --set-selections < installed-packages.txt

The command above is a little different and those differences mean:

  • --set-selections is the action that sets the package selections using a file read in from standard in.
  • < textfilename.txt will read the contents of the file and send them to standard in.

Conclusion

Backing up and restoring your package installation list is a really simple procedure in Debian based distributions. You can even script it out and run it on a schedule and then save it to a cloud storage service such as Dropbox. Let me know what you think and if you have a better process.

Written by Jonas Gorauskas

May 19th, 2011 at 3:15 pm

Posted in Linux,Quick Hacks

Tagged with , , , ,