Muffinresearch Labs by Stuart Colville

Archive for the 'Linux/Unix' Category

  1. Fixing pbuilder dependency 404 errors - 15th September 2012
  2. Linux: Spotify Screensaver D-Bus Script update - 27th October 2011
  3. Linux: Spotify Track Notifier with added D-Bus love - 23rd March 2011
  4. Updating Vim to Use Plugins From Branches - 11th February 2011
  5. Android: Force Moving Apps to an SD Card - 2nd February 2011
  6. Spotify ScreenSaver Toggle with D-bus - 3rd November 2010
  7. Fake SMTP server with Python - 15th October 2010
  8. Inverting Screen Colours for Late-Night Hacking - 30th September 2010
  9. Ubuntu: Spotify Screensaver Toggle - 13th September 2010
  10. Debugging Elusive Puppet Errors - 8th June 2010
  11. Ubuntu: java.net.SocketException in ec2-api-tools - 4th June 2010
  12. Adding more disk space to a Linux Virtual Machine - 30th March 2010
  13. Linux: Fix for apt-get update – Waiting for Headers - 30th March 2010
  14. Solved: VirtualBox Ubuntu Karmic Server VM crashes - 8th February 2010
  15. Howto: SSH into VirtualBox 3 Linux Guests - 8th February 2010
  16. Ubuntu: Changing the default java binary - 5th December 2009
  17. Ubuntu: Lock Screen and Pause Spotify - 22nd October 2009
  18. VirtualBox: Error: Cannot register the hard disk - 23rd July 2009
  19. BASH: Using brace expansion - 22nd June 2009
  20. vim: automatically highlight long lines - 22nd June 2009
  21. Bash: turn on case-insensitive tab completion - 6th June 2009
  22. Running VMware images under VirtualBox - 4th June 2009
  23. Simple Switching of VirtualEnv Environments - 12th May 2009
  24. Vim: Setting the colorscheme Doesn’t Work - 28th April 2009
  25. VirtualBox: Access Guests via a Virtual Interface - 8th April 2009
  26. From OSX to Ubuntu - 5th April 2009
  27. Unix Permissions Calculator - 2nd March 2009
  28. Puppet: Server Configuration Made Easy - 18th January 2009
  29. Checking tarball contents before extraction - 10th November 2008
  30. Bash: Resolving Symlinks to Shellscripts - 10th October 2008
  31. Ubuntu: change editor globally - 7th October 2008
  32. Linux: Changing UIDs and GIDs for a user - 24th September 2008
  33. Ubuntu: BUG: soft lockup – CPU#0 stuck for 11s! - 20th August 2008
  34. Working around uTidyLib’s unicode handling - 29th July 2008
  35. VMWare: Fixing Time Drift in AMD Dual-core Systems - 22nd July 2008
  36. Ubuntu Hardy: Setting up VMWare-tools from the CLI - 13th July 2008
  37. Vmware: “SIOCSIFADDR: No such device eth0″ after cloning - 13th July 2008
  38. No Interfaces Available Using Wireshark on Mac OSX - 2nd June 2008
  39. pwdn: show last n dirs of current directory - 2nd April 2008
  40. Mac OSX tip: ls command color output - 1st April 2008
  41. Django: Switching between development branches - 9th March 2008
  42. From the command line to your clipboard and vice versa - 4th March 2008
  43. Extracting a single file from a tar backup - 12th November 2007
  44. Showing last two directories of pwd in BASH prompt - 25th September 2007
  45. BASH: Single-quotes inside of single-quoted strings - 30th January 2007
  46. SSH SOCKS Proxy - 19th January 2007
  47. MacFUSE: sshfs for your mac - 19th January 2007
  48. Dedicated server recovery mode - 1st January 2007
  49. Ubuntu Edgy under Parallels Desktop for mac - 3rd November 2006
  50. Six useful shell commands for web developers - 16th October 2006
  51. vim tip: Fix the cursor keys echoing characters in insert mode - 15th October 2006
  52. Redirecting subdomains to directories in apache. - 20th August 2006
  53. Keeping ssh connections alive - 1st June 2006
  54. Ubuntu Breezy Badger install horrors - 18th October 2005
  55. fscked up beyond all recognition - 23rd August 2005
  56. Ubuntu Ubuntu they drink it in the congo - 2nd August 2005
  57. Linux command locate – useful for err… locating files? - 15th May 2004

Insert a tab character in vim when expand tabs is on|(0)

I have vim set-up to use spaces in place of tabs. Sometimes you need to use an actual tab e.g. editing a Makefile. Now whilst it’s possible to change settings so that tabs are used for specific files, a quick tip to remember is to simply type in insert mode:

Ctrl+v tab

That is Ctrl and “V” and hit the tab key, et voila you’ve entered an actual tab.

GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Photos on Flickr

© Copyright 2004-13 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.544s.