Thursday, January 27, 2011

Change screenshot save location on MACOS

By default, anytime you take a screen capture in Mac OS X it will save the screenshot file to the current users desktop. You can adjust where Mac OS X saves a captured screenshot to any other location, here is how to do this:

Launch Terminal and use the following syntax:

defaults write location /path/

For example, if I want to have the screenshots appear in my Pictures folder, I would use:

defaults write location ~/Pictures/

To have the changes take effect, you then must type:

killall SystemUIServer

So the next time you take a screenshot (or as Windows converts like to say, Print Screen on a Mac), the screenshot file will appear at the location you specified.

You can change the saved screenshot location back to the default setting by specifying the desktop again:

defaults write location ~/Desktop/

Again, you’d need to kill SystemUIServer for changes to take effect.

Monday, January 24, 2011

Moving SVN to new server

I recently had to move our main Subversion repository to a new server the other day, so I thought I would pass along this quick how-to.

To move a Subversion repository from one system to another you only have to enter a couple of easy subversion commands. To start, go to the source system and at a command prompt or terminal window type:

svnadmin dump /path/to/repository > repository-name.dmp

If the dump file is rather large you can compress it with your favorite zip utility. Now you need to get the dump to your new server, so simply transfer the file via FTP, local share, CD, thumbdrive or whatever it takes.

Once the dump file is on the new machine and uncompressed, you need to set up and load the new repo by typing:

cd /path/to/new-repository
svnadmin create repository-name
svnadmin load repository-name< repository-name.dmp

A couple of small things to note – the dump file will be rather large as it represents every commit made on your repository. If your repository is rather large and mature, this file could get quite large. Also this method works across platforms so moving from UNIX to Windows or visa-versa is also possible.