The remedy for this situation? The --all
switch to git log
. Continue reading
Author Archives:
Ubuntu and the X220T Touch Screen
I recently sorted this out, so I thought I’d share the scripts that worked for me on Saucy Salamander Ubuntu 13.10 with Unity.
First, work out which device you actually want:
$ xsetwacom --list
Wacom Bamboo stylus id: 11 type: STYLUS
Wacom ISDv4 E6 Pen stylus id: 13 type: STYLUS
Wacom ISDv4 E6 Finger touch id: 14 type: TOUCH
Wacom Bamboo eraser id: 19 type: ERASER
Wacom Bamboo cursor id: 20 type: CURSOR
Wacom Bamboo pad id: 21 type: PAD
Wacom ISDv4 E6 Pen eraser id: 22 type: ERASER
Then, use xsetwacom
to get the right touch input relating to the correct screen, even with multiple monitors:
$ xsetwacom set "Wacom ISDv4 E6 Finger touch" MapToOutput LVDS1
At this point I should point out that my touch screen is incorrectly configured and therefore needs the script above running every time I plug or unplug an external display. Since I dock my machine, move it almost daily, and regularly present … that’s kinda irritating. Any solutions on improving that are welcome.
GitHub-Powered Changelog Scripts
This has been working pretty well, and today I got the question “what’s new since I last saw this project?” – so I created a changelog. It’s rather rough-and-ready but I had fun so I thought I’d share. Continue reading
Splitting And Combining Odd/Even Pages With Pdftk
Zend Certified PHP Developer 5.5
Sample Questions Pack
One really important step in preparing for this exam is to get an idea of what kind of questions you might be asked – in terms of the format of the questions and the topics. I have a pack of 70 questions which I use when delivering ZCE preparation courses, but I also sell it separately and it is now updated for PHP 5.5
This pack is now available from https://leanpub.com/zce
As well as questions, this includes answers with detailed explanations of how those are reached and links to further reading. There is also some advice about the format of the exam and what to expect on the day itself.
Links Bundle
The PHP Manual is fabulous, but sometimes you need a more conceptual explanation. I maintain a bundle of links to blog posts or other tutorials on the various topics involved in ZCE, which you may find helpful to dip into for your own study:
http://lornajane.net/zce-links-collection
If you find any broken links, or have any resources you think should be included, just let me know. I intend for this to be a living document that we can share.
Revision Flashcards
My advice for cramming for ZCE is always the same: you need to recap all areas of the manual but focus especially on strings and arrays, because while there will be an average number of questions on these topics, it’s common to see strings and arrays used in questions that are really about function scope, or inheritance, etc.
For my own revision, I created flashcards by taking the PHP manual and making them into double-sided PDFs that I could cut up and use (you could do this with a single-sided printer, print the odd pages first and then put the paper through again – for duplex printers beware that you need to choose “short side”).
Here are the String and Array flashcards that I used for myself (they’re not perfect, but I found them useful so if you want to download them, you can. The main omission is that I stripped < and > characters which makes for interesting string comparison documentation).
Hopefully some of these resources will help you prepare for your own professional certification – good luck :)
Upcoming Git Courses
- Dublin, 30th January: Git and GitHub Foundations
- Dublin, 31st January: Git and GitHub Advanced
- London, 6th February: Git for Teams
I have fantastic partners for these events: the Dublin ones are with Github and the London ones with FLOSSUK, and I look forward to both. Right now they all do still have places remaining, visit my courses page for the links you need to book. Training days are a great opportunity to boost your skills and discuss specific aspects of technology that you can’t really get from a textbook – hope to see you at one of these sessions, I am standing by for difficult questions :)
Git, Vimdiff, and Merge-Base
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.