Anna Pawlicka

Programmer. Hiker. Cook. Always looking for interesting problems to solve.


About | Archive | Talks

Code snippets for Keynote

09 Jun 2014 |

I've been looking for an easy way to format code snippets for my Keynote presentation and everything seemed quite awkward to use (especially taking screenshots!). I could just add a link to the example and make it open a local webpage, but I’d rather not do that for very short snippets. After some quick research I’ve settled with highlight.

You can install it with homebrew:

brew install highlight

I put my snippets into a file (snippets.clj in the example below), and then run this to copy the formatted snippet to clipboard:

pbpaste | highlight --syntax=clojure -O rtf snippets.clj | pbcopy

-O rtf specifies format of the output file (which is rtf for Keynote). Highlight supports lots of languages and customising possibilities are endless. The end effect looks like this:

Sample slide with code snippet


Older · View Archive (25)

The end of summer. The end of internship. The end of awesome.

This has been a whirlwind of a summer, and I can’t believe it’s come to an end.  Working at [Mastodon C][1] has been exactly what I wanted it to be: an awesome experience. I can honestly say I enjoyed every single day. Whether I was working my way out of JavaScript’s scoping labyrinths or learning the power of Cascalog, there was a sense of pride for me knowing that I had directly participated as a part of the team. With a very very rare coffee requests ;-)

Newer

Common mistakes to avoid when creating an Om component. Part 1.

For the past few months I've been creating various Om components and most of the time it goes smoothly. But sometimes I do something silly, and it's not always obvious what it is. What's obvious is that the UI doesn't work and throws (sometimes cryptic) errors at me instead. Today I'm gathering what I remember into a tiny post. Maybe someone will find it helpful. And maybe I'll finally remember those mistakes after putting them down on paper interwebs. One can hope!  :-)