Muffinresearch Labs by Stuart Colville

Archive for the 'Code' Category

  1. Recover Files from Nandroid Backup - 27th October 2011
  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. Fake SMTP server with Python - 15th October 2010
  6. Inverting Screen Colours for Late-Night Hacking - 30th September 2010
  7. Ubuntu: Spotify Screensaver Toggle - 13th September 2010
  8. Taking Screenshots of your Android Phone - 7th September 2010
  9. Development Workflow - 28th July 2010
  10. Debugging Elusive Puppet Errors - 8th June 2010
  11. Ubuntu: java.net.SocketException in ec2-api-tools - 4th June 2010
  12. Ubuntu: Installing the Beebem BBC Micro Emulator - 27th May 2010
  13. Adding more disk space to a Linux Virtual Machine - 30th March 2010
  14. Linux: Fix for apt-get update – Waiting for Headers - 30th March 2010
  15. Solved: VirtualBox Ubuntu Karmic Server VM crashes - 8th February 2010
  16. Howto: SSH into VirtualBox 3 Linux Guests - 8th February 2010
  17. Ubuntu: Changing the default java binary - 5th December 2009
  18. Updating Speedtouch 585 DNS settings - 5th December 2009
  19. Ubuntu: Lock Screen and Pause Spotify - 22nd October 2009
  20. Open Redirects and Phishing Vectors - 30th September 2009
  21. Cross Platform Keyring Library for Python - 26th August 2009
  22. PHP: Multiple DNS Queries Using fopen - 12th August 2009
  23. VirtualBox: Error: Cannot register the hard disk - 23rd July 2009
  24. BASH: Using brace expansion - 22nd June 2009
  25. vim: automatically highlight long lines - 22nd June 2009
  26. Fixing setuptools “TypeError: swig_sources()” error - 8th March 2009
  27. Unix Permissions Calculator - 2nd March 2009
  28. Favicon Generator Launched - 10th February 2009
  29. Bazaar: Moving files after the fact - 29th January 2009
  30. Puppet: Server Configuration Made Easy - 18th January 2009
  31. Large Temporary Files Left Behind by ImageMagick - 18th January 2009
  32. Checking tarball contents before extraction - 10th November 2008
  33. Bash: Resolving Symlinks to Shellscripts - 10th October 2008
  34. Ubuntu: change editor globally - 7th October 2008
  35. Linux: Changing UIDs and GIDs for a user - 24th September 2008
  36. Ubuntu: BUG: soft lockup – CPU#0 stuck for 11s! - 20th August 2008
  37. Working around uTidyLib’s unicode handling - 29th July 2008
  38. VMWare: Fixing Time Drift in AMD Dual-core Systems - 22nd July 2008
  39. Ubuntu Hardy: Setting up VMWare-tools from the CLI - 13th July 2008
  40. Vmware: “SIOCSIFADDR: No such device eth0″ after cloning - 13th July 2008
  41. Search Django Snippets with GreaseMonkey - 8th July 2008
  42. CSS Sprite Generator Version 2.0 - 24th June 2008
  43. MySQL Moves to Bazaar for Source Control - 22nd June 2008
  44. No Interfaces Available Using Wireshark on Mac OSX - 2nd June 2008
  45. Fixing the display of history in terminal.app - 1st June 2008
  46. Titlecase.py: Titlecase in python - 27th May 2008
  47. VMWare Importer for converting Parallels images - 4th May 2008
  48. Python: Debugging with PDB - 27th April 2008
  49. mac tip: Lock screen and pause iTunes - 24th April 2008
  50. Google App Engine - 8th April 2008
  51. Automatic asset versioning in Django - 8th April 2008
  52. Avoiding the use of .htaccess for performance - 7th April 2008
  53. pwdn: show last n dirs of current directory - 2nd April 2008
  54. Mac OSX tip: ls command color output - 1st April 2008
  55. Django: Switching between development branches - 9th March 2008
  56. From the command line to your clipboard and vice versa - 4th March 2008
  57. Does setTimeout solve the DOMContentLoaded problem? - 15th February 2008
  58. EU Hackday 5: Django and Python FTW - 10th February 2008
  59. Sqlite: ALTER TABLE ADD COLUMN fail on OSX 10.4 - 5th February 2008
  60. CSS Sprite Generator code available at launchpad.net - 1st February 2008
  61. Bazaar 1.0 released - 17th December 2007
  62. Presentation: De-centralised Version Control with Bazaar - 8th December 2007
  63. Running a Safari 2 Standalone Alongside Safari 3 - 20th November 2007
  64. Extracting a single file from a tar backup - 12th November 2007
  65. Using ‘select’ for multiple choices in shell scripts - 8th November 2007
  66. Python: Transposing Lists With map and zip - 16th October 2007
  67. Case Insensitive File-systems and Bazaar - 28th September 2007
  68. CSS Sprite Generator Tool - 27th September 2007
  69. Showing last two directories of pwd in BASH prompt - 25th September 2007
  70. Contributing to projects on Launchpad.net with Bazaar - 14th August 2007
  71. Dealing with Text Conflicts in Bazaar Version Control - 5th June 2007
  72. Multimap opens up it’s API to developers - 29th May 2007
  73. Mark all mail as read in mail.app - 25th May 2007
  74. Online and offline development with the YUI and Charles - 26th April 2007
  75. Bazaar Version Control - 22nd April 2007
  76. BASH: Single-quotes inside of single-quoted strings - 30th January 2007
  77. Basic DOMTool Tutorial - 13th December 2006
  78. DOMTool - 28th November 2006
  79. No more iframes? - 27th November 2006
  80. Getting relative form actions with javascript - 24th October 2006
  81. Bug when creating select options using innerHTML in IE - 19th July 2006
  82. getElementsByClassName Deluxe Edition - 29th April 2006
  83. Element Ready - 12th April 2006
  84. Don’t use Javascript to hide bad markup - 30th March 2006
  85. Yahoo! launches UI library and Design Patterns - 15th February 2006
  86. Dreamweaver lock files exposed - 22nd November 2005
  87. Dvorak’s comment spam fix - 26th September 2005

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 1.555s.