Pages

Monday, February 20, 2012

Vundle to manage my VIM plugins.

To avoid getting too dependent on a VIM plugin that might not be available on the different machines I access, I've avoided having too many of them.  I mainly look for plugins that will make writing code faster since I do most of my development on just 2-3 machines.  Recently, a project required me to get back into Java programming.  Java projects are one of those that really seems to benefit from using some form of IDE especially for navigating through the code, but after trying Eclipse (which is pretty nice) I still felt that writing code is faster in VIM for me.

That lead me to Eclim which is an Eclipse and VIM plugin combo that allowed VIM to access Eclipse's functionality.  This is pretty cool as it allowed me to do most of my work in VIM and switch to Eclipse when I needed to.  While this solution works, I started getting the itch to see how VIM can handle some of the tasks I was depending on Eclipse for so I started looking at various VIM plugins which led me to research how to manage plug-ins in general.

Initially all the info I found talked about Pathogen which allowed each plug-in to be stored in its own directory and address the big problem of having all of your plugins clumped together in the .vim directories.  However, you still had to manually download and install each plugin.  Most users of Pathogen went the path of using Git to manage the plugins pulling each plugin from Git as a submodule.  I was about to give Pathogen a try when I came across Vundle.  Vundle take Pathogen and take it one step further by integrating the downloading and installation of your plugins.

Essentially, you install the Vundle plugin and then in your .vimrc list the plugins you want to use.  Start up VIM and do a ":BundleInstall" and it will download the plugins to their own directory and install/upgrade each one.  It's all very clean.

set nocompatiblefiletype offset rtp+=~/.vim/bundle/vundlecall vundle#rc()
Bundle 'gmarik/vundle'
Bundle "bufexplorer.zip"Bundle "snipMate"Bundle "SuperTab-continued."Bundle "taglist.vim"
Bundle "bufkill.vim"Bundle "Command-T"
 Having this at the top of your .vimrc and you can immediately see what kind plugins to use (remove one and Vundle will uninstall it for you as well).  If you share your .vimrc across multiple machine (i.e. through github) you don't have worry about keeping copies or download the plugins yourself since vundle handles all of that.

Saturday, February 18, 2012

Uninstalling MySQL on OSX

If you use the package installer to install MySQL (as opposed to building from source, from macports, etc.) then do the following when you want to remove MySQL:

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql*
rm -rf ~/Library/PreferencePanes/My*

Remove the line "MYSQLCOM=-YES-" from /etc/hostconfig
Remove entries in /Library/Receipts/InstallHistory.plist

Monday, October 10, 2011

Latest Shop Addition: Router Table


After using a lot of make shift router tables to build my shoe cabinet, I decided to buy a router table. Router tables are very versatile and woodworkers often build their own (much like building a workbench is a rite of passage), but this time I decided that I'd rather just buy one and use my time on building other things instead. Instead of a full size router table, I went with a portable benchtop model because my space is limited so I went with the Benchdog contractor's table.

It wasn't difficult to setup and the table top and fence is pretty nice. It is a benchtop version so it has to sit on something or it is pretty low to the ground. Putting it on top of my workbench would make it too high to comfortably work with so I decided to build a mobile base for it which will also give me some extra storage for all my router related stuff while letting me move the table around the shop easily.

I used plywood that was left over from another, bought 3 inch casters and spent an afternoon working on it.  Compared to how long it took me to build the shoe cabinet, making this cabinet went lightning fast.  Having the router table to help create the dado and rabbits definitely made things go much faster. 

Posted by Picasa

Wednesday, August 31, 2011

Straightening Warped Ikea Solid Wood Table Top Part 1

Ikea, mostly known for its modern Scandinavian design particle board furniture, also sells some solid wood products such as counter tops and table tops.  They aren't expensive hardwoods but cheaper woods such as pine and beech, but if you don't have the equipment or time to mill your own stock (thickness planer, jointer, etc.) and laminate them together then Ikea might be an alternative.

That was my thinking since I wanted to have wood table in the office that can take some abuse, but I don't have the equipment to do it from rough stock.  Telling She-Who-Must-Be-Obeyed that I'm going to spend $800 on equipment to build a $100 table won't end pretty so for $79, I picked up the beech wood table top and a few legs.

The table top looks nice, but to my dismay when I opened up the box it was obviously slightly warped.  My wife didn't seem to notice but I took out my 4' level and sure enough there was a slight curve around 1/8th of an inch.  My first thought was to go exchange it but transporting the sucker is a pain.  After some googling, I settled on an "old timer's" method.

Take the table top and put it on grass that is slightly damp during a sunny day with the concave side facing down.  This will let one side absorb some moisture and the sun will dry/pull moisture through the other side.  The idea is to balance the moisture content in the wood so that it will flatten.  After leaving it out for about 3 hours, the wood had indeed flattened.  Actually it started to warp a little in the other way so I had to flip it one more time and keep a more careful eye on it.

Once it was flat, I took it into the garage but sometime can up and I had to leave it there for a few hours.  When I returned, the table was warped again but not as bad as before.  My idea was to sand the table when it was flat so that I can immediately apply some polyurethane varnish to seal the moisture so that it won't warp again, but couldn't get to it in time so it looks like I will have to try this again next weekend.

Tuesday, July 12, 2011

Some Garage Organization

The July 4th weekend gave me a chance to tackle organizing the garage.  It is a 2-cars garage and it was important for us to be able to park at least one car in and not use everything for storage and the workshop.    After some research, I went with the RubberMaid FastTrack system for the walls since they aren't too expensive and can be installed by one person.

This is the "parking" side of the garage.  The alcove in the back corner was a perfect fit for the wing-chun stand and the wood cart was exactly the right depth that I can push it against the wall still be able to fold down the steps up to the attic.  The kids' bikes and stroller hangs off one fast track.



This is the "workshop" side of the garage.  It is still not completely done but right now it allows me to keep stuff somewhere without them getting underfoot.



I need to get some more hooks and I'm planning to add some shelving above the workbench.  The floor is pretty sloped and took a lot of shims to get it leveled.


Sunday, July 10, 2011

Setting up VNC on Fedora 14

As part of going down the wrong path to debug another problem, I found myself trying to set up VNC Server on my new Fedora 14 machine.  Setting up VNC itself is pretty simple with yum and instructions can be found here including configuring the firewall to accept it:  How to Setup VNC.

Of couse, once you have VNC running, Fedora don't actually let you access it from a client and eventually I found this post which answered how to configure SELinux to allow remote connection to VNC: Fedora 14 and SSH port forwarding.

I love Linux, but sometimes it's things like these that can drive general users away.

Thursday, June 30, 2011

Getting a DHCP Linux Host to Broadcast Its Name

When set to using DHCP, the IP address of the machine can change.  When running a server that can be annoying so in the past, I've generally assigned it a static IP and edit all the other machines' /etc/hosts file to give a name that points to the server.  Instead of keep doing this, I decided to have the Linux server broadcast its name to the local network.

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 by adding DHCP_HOSTNAME=<your machine name here>.

This is the location for Fedora so your distribution might be different.  ifcfg-eth0 is dependent on whatever network adaptor you want to config (i.e. if you're using a wireless adaptor it'll have a different name).

Finally, restart the network and your server should be found by your other machines simply by its name.