pancake theorem a blog by jenn schiffer


Code & Tutorials

Change your Mac’s screenshot cursor to something other than that boring black camera

I take screenshots all the time, and I hate the default black camera that Mac OS X has when you do selection captures. I figured it would be easy as hell to replace it: just find that icon, then switch it with the one I want. So while Jimmy made the world’s best grilled cheese sandwiches last night, that’s exactly what I did.

The first task was finding original camera image. I actually lucked out by assuming it was in a folder of cursors, since that’s what it technically is. I searched my Mac for “cursor” and it fortunately popped up pretty quickly (my machine is running Mac OS X Lion 10.7.2, by the way). You can do the same (search “cursor.png”), or go to the patch of the folder it resides in. See the following screenshot to see what I mean – it’s quite a mouthful:

Once you’re in the folder that contains cursor.png, you want to open that image in a graphics editor to add a layer for your new camera graphic, then delete the original layer. This way your new cursor is in the same mode and format as the original cursor. Bill Brown’s Camera Collection is hands-down the best place to go if you want to find 8-bit-style camera icons. Since I love my Diana+, I grabbed that illustration to be my new screenshot cursor.

Save the new cursor you made to your Desktop, as the cursor.png’s folder is not editable without authorization. Name it “cursor.png” and drag it into the cursor.png folder. The OS will most likely bark at you and make you log in.

I renamed the original cursor to “cursor-original.png” just in case I wanted to revert to it in the future. Once you’ve replaced “cursor.png” with your snazzy new icon, restart your machine to watch it take effect. No more boring camera cursor!

How I ever slept at night before I did this, I’ll never understand.

Add permalinks to the end of your WordPress RSS content

I did some much-needed cleanup of my server over the holiday break. One of the main tasks was removing this blog into a different directory and out of a former WordPress multisite network.

While playing around with the “new” site, I did some small changes that I’ve been meaning to do for months – changes as simple as adding my post’s permalink to the end of each post in my RSS feed.

You can do it, too. Just add the following function and filters to your theme directory’s functions.php file:

<?php 
 
// add permalink to end of each RSS post
function permalinksInRSS($content) {
    $content = $content.'<p><a href="' . get_permalink() . 
'" rel="bookmark" title="Permanent link to \''.get_the_title().'\'">[permalink]</a><p>';
    return $content;
}
add_filter('the_excerpt_feed', 'permalinksInRSS');
add_filter('the_content_feed', 'permalinksInRSS');
 
?>

You can change “[permalink]” to whatever text you want to show. For example, my feed now says “[View this post on pancake theorem.]”

I’m assuming there may be a plugin out there that does this, but I’m not down with OPP (other people’s plugins) when it’s as simple as this snippet.

Note: If it doesn’t work after adding the code, you should refresh your blog’s cache, (and re-ping it on Feedburner if you use it).

CSS Breakfast Gist

Yesterday I mentioned Dabblet, a new CSS-oriented answer to JSFiddle. To play around with it, I decided to make some CSS-illustrated breakfast foods. I have to tell you, using Dabblet really made the workflow pleasant: the code is very readable, the screen automatically updates with every keystroke, and connecting it to Github allowed mindless saving as I made changes.

You can see the Dabblet here, or view the Gist. It’s nothing too fancy, just some pancakes and stuff (hover over the syrup for some simple transition action).

I think I’ll be moving all of my “playground” code to Github, so I’m excited to use Dabblet even more.

Typing Code – what do you use?

Let’s talk about text, baby.

I love typing and I do it a lot, so it’s important for me to have an efficient workflow and a pleasant experience with the text editors and IDEs that I use. I had been a Windows user up until I received my first big paycheck (right before my Senior year of college), which I immediately used to splurge on my first MacBook. This change in OS was a big deal only because it meant finding new alternatives to the Windows-only software I grew accustomed to.

New to the Mac, and still sour over my forced separation with Notepad++,  I started following a bunch of Mac application review sites. One of them had this great review of Coda – a $99 one-window dream of an application that has since spoiled me with its incredible workflow and extension possibilities. I remember trying Coda’s month-long trial and I FELL. IN. LOVE. I still use it to this day, every day.

At work, I don’t have the privilege of just buying whatever software I want to use, so I’ve turned to using open source and freeware solutions. Web development is just one facet of my job, so it’s not like I end up using these applications for extended periods of time – unlike when I’m working at home (which I certainly still do). At this point, the applications are adequate, but they do not provide a workflow that’s anything like Coda or its rival applications. When it comes to text editors on the job, TextWrangler is what I use the most. It’s free, but not open source. The logo looks like a “W” made of spaghetti, so I guess that’s cool. Unfortunately, I get this feeling of being lost when I am working between editing in TextWrangler and uploading with a separate FTP client. It’s kind of like the feeling I get when I’m working in a coffee-house and do not have my second widescreen monitor with me. Or my Magic Mouse. It’s like I’m working with my hands tied behind my back. Oh well…

When it comes to IDEs, I find myself working almost exclusively with Eclipse. When I was learning Java in college, we were all using jGrasp since it was included in the textbook materials. I did a project with someone using NetBeans and it was a nightmare. They made the entire user interface using The NetBeans Swing GUI, and it was like working with code generated by saving a document as HTML in Microsoft Word. A bloody NIGHTMARE. Also, I’m weary of investing time into an application “sponsored by Oracle,” since I’d be unsure if it will continue to be updated in the future.

Since most of you are programmers, too, what IDEs and/or text editors do you use – and what languages are you working with on them?

Top 10 Programming Languages by TIOBE Index, Books, IRC, and Craigslist posts

Here’s an infographic of top programming languages that I like: interesting, colorful, printable. This one clearly shows the popularity of various languages in multiple domains: a research index, book titles, IRC discussion, and job postings.

You can view more of the data at the now-for-sale LangPop.com, which I recommend checking out to see what those “other” languages are. It’s a good instrument in deciding what languages you want to take a stab at if you’re feeling adventurous.

(Source: IEEE spectrum – a must-follow.)