git merge-base
is this week’s favourite git command. I use it to show me in a vimdiff everything that has changed on a particular branch since it was created. This took a little bit of looking around to find how to combine the tools, so I thought I’d write it all down in one place. Continue reading Hiding Sections With Rst2pdf
Printing Many PDFs Per Page
This weekend I was working on a project which needed a programatically-generated PDF file to be many-slides-per-page – and for this I adopted a tool I haven’t used before: pdfjam (installed straight from apt on Ubuntu).
In fact it was pretty easy to get going with it: to print my existing PDFs at 4-per-page, I used this command:
pdfjam --landscape --nup 2x2 --a4paper -q slides.pdf -o handout.pdf
The slides themselves were already landscape so I specified the target document should also be landscape. The --nup 2x2
is the magic that prints many slides per page, and it seems like it can do various nice tricks with handouts. Running through the other arguments that I used: --a4paper
for the paper size, -q
to stop it from chattering (which it does by default, even when everything worked), slides.pdf
was my input file and -o handout.pdf
the target file to put the new layout into.
Until now I’ve mostly worked with pdftk for everything, but I couldn’t find a way to do this using it. Pdfjam is now a welcome addition to my PDF toolchain, so I thought I’d share.
DimpleJs Bubble/Scatterplots and Joind.in Data
Open a GitHub Pull Request with Hub
Doing Google Custom Search via API
Google Custom Search Engine
It’s possible to set up and configure a custom search engine in Google, so you can configure some settings and the search will always use those settings. To begin, go to http://www.google.com/cse. Here you can create a search engine, give it a name and description, and then set some options. You can choose whether to search for images, or not, or images only. You can include or exclude certain sites, or search everywhere and just prefer certain sites. Continue reading
Git Add Interactive
Working with R and Vim
It’s possible to run R just from a prompt, which works well for individual commands but isn’t great for editing those commands or keeping track of what you did. Looking around, I found that there is (of course!) a Vim-R plugin available, so I gave it a try – and really liked it! It is enabled for files ending in .R or .Rmd and allows you to launch an R prompt and run one or many lines in that prompt directly from vim.
The .Rmd format is actually for R Markdown, which is a markdown format that lets you embed R. I’ve been using it as a sort of lab book to keep track of what I did and why. You can then generate a document with all the R code shown and evaluated – very neat!
Chrome Feature: Copy as cURL
Ada Lovelace Day 2013: Donna Benjamin
Donna’s been a virtual friend for a few years; I “intermet” her when I was preparing to host the Dutch PHP Conference in Amsterdam, in 2010. I had some great role models from the PHP community to show me how to “ringmaster” at a big conference, but I was unsure how it would look on a woman. Having already done a similar role for PHPNW, I’d had negative feedback about being teacherish (something that I still get complaints about), and I wasn’t sure how else to wear that role. Lots of things work well for men but not for women (silly things, swearing on stage (this differs between cultures), asking for a pay rise, falling out of bed into whatever free conference shirt you were given yesterday ….) and I was determined not to turn myself into a decorative but ditsy hostess.
My good friend Kathy Reid talked through my anxieties with me, and sent me a link to a video of Donna introducing an even more major conference: Donna organised Linux Conf AU and the video showed her introducing it with equal helpings of excellence, approachability, and entertainment. Confident that I wasn’t alone, I stopped worrying and gave that conference my best shot. Continue reading