Change default save location of screenshot on Mac OSX

voila_capture3
IMAGE SOURCE: http://www.globaldelight.com/blog/

Mac OSX lets you easily capture screen shots of your entire screen or just a specific window using:

Command + Shift + 4

I use this functionally often and got tired of captures being saved to my desktop (the default). To change you simply run terminal and change the system default:

defaults write com.apple.screencapture location ~/Pictures/Screenshots/

Make sure the directory exists first or it will not work.  To have the changes take effect, you then must type:

killall SystemUIServer

Another useful trick is to be able to screen cap directly to clipboard and never store the screen shot on your drive. This makes it really easy to paste into documents or e-mails. To do this

Command + Control + Shift + 4 (not f4).

Its a bit hard to execute the keystroke with one hand so you can use two hands then use the mouse to select the area you want to capture.

Add Syntax Highlighting to VIM on Mac OS X

It is extremely useful to be able to quickly edit code files inline in the mac terminal.  This post assumes you are at least somewhat familiar with the vim console text editor.  On mac by default you simply get plain text which whatever theme you are in.  For the homebrew theme you will see something like this for a simple ruby on rails controller file:

Screen Shot 2013-12-21 at 12.13.30 AM

It is much easier to look at and edit code if it is color coded.  It is quite simple to enable this on mac.  You just need to edit the .vimrc file to contain a few lines.  The .vimrc is usually located at the user root ~/.vimrc, if it does not exist you can create it using vim.

vim ~/.vimrc

Then add the following lines:

filetype plugin indent on

set term=builtin_ansi

syntax on

After adding these lines you should

Screen Shot 2013-12-21 at 12.12.22 AM

If you run into trouble, here is a link: http://vim.wikia.com/wiki/Turn_on_syntax_coloring_in_Mac_OS_X

Adding Flickr Photostream Widget to WordPress (RSS Missing/Broken)

My Goal

The new Flickr interface is sweet and I can’t really complain about 1TB of free storage.  I wanted to add my photostream to my WordPress blog at mikekennewick.wordpress.com by enabling the Flickr Widget which requires your Flickr RSS feed URL.  Check.

I Couldn’t Find RSS in New Flickr Interface

If you are having trouble figuring out how to get the RSS feed for Flickr you are not alone.   I spent 10 minutes hunting around for a little orange RSS icon that is nowhere in the new interface.  Even after Googling I couldn’t easily find it.  Eventually dug into the page source.  I right clicked on the page at  http://www.flickr.com/photos/mikekennewick/ and clicked view source.  Then searched for RSS.  Interestingly in the header there is a link to the photostream RSS feed:

<link rel=”alternate” type=”application/rss+xml” title=”Flickr: Your Photostream RSS feed” href=”/services/feeds/photos_public.gne?id=94802687@N06&amp;lang=Array[intl_lang]&amp;format=rss_200“>

I pasted it into the browser with the root Flickr page and to my surprise it worked: http://www.flickr.com/services/feeds/photos_public.gne?id=94802687@N06&amp;lang=Array[intl_lang]&amp;format=rss_200

flickrrssraw

If you want to get your RSS Feed you will need to know your ID, you can either get from source or use this service and type in your photostream URL: http://idgettr.com/  when I did this it returnedidGettr

If you want your RSS URL simply take the below URL and replace {InsertYourIDHere} with your ID.

http://www.flickr.com/services/feeds/photos_public.gne?id={InsertYourIDHere}&lang=Array[intl_lang]&format=rss_200

My WordPress Blog with Flickr Widget

After finding and pasting the right URL and enabling the Flickr Widget it worked!  Check it out below.

flickrwidget

Eventually I Found RSS Feed but its broken

Later I did find an RSS feed conveniently hidden under You -> Recent Activity.  However at the time of this post it appears to be broken and is pointing to a different URL.

flickrrss

http://api.flickr.com/services/feeds/activity/all?user_id=94802687@N06&secret=lIF0Yf%2B1JRZcDmvYKpj7aNPcaDY%3D&lang=en-us&format=rss_200

Its likely a bug and will hopefully be fixed soon.  You can contact me at mikekennewick.com or @mikekennewick if you need any help getting this working.