Tag Archives: tools
Scaling and Sizing with PDFJam
pdfjam --suffix converted --papersize '{1920px,1080px}' --scale 0.4 --trim "-6cm -1cm 13cm 8cm" slides.pdf
The --suffix
is instead of giving an output filename, whatever you feed in ends up with the suffix in its filename. This is very handy because I use this command in a script and only need to pass in one variable. The --papersize
isn’t a switch I have used before either but you can set exact sizes for the final output which is nice. The --trim
switch can also be used to set --clip=true
to remove the trimmed space from the document if desired.
I find PDFJam a very handy tool but with not nearly enough blog posts and code snippets around, so I’m dropping my command for future reference (yours as well as mine!).
Gollum the Git-Enabled Wiki
– must handle words and documents
– should be available locally, bonus points for revision history
– must publish to the web, and ideally be editable there
– should accept content in markdown
– must have access control (which wiped out my original plan of using a static site generator)
While I worked on this, we were using the wiki feature in GitLab … which pretty much hit the nail on the head. Further investigation showed that the wiki feature in GitLab (and indeed in GitHub) is a ruby gem called Gollum. Continue reading
Set Up Your First Hubot
Continue reading
Hubot and Slack
- Hubot will not respond to you in PM, you need to join a channel and then
/invite @hubot
and your bot will join you in that channel and then respond when you address him/her by name - When configuring channel names for slack (I use the gitlab plugin which needs a GITLAB_CHANNEL environment variable), do NOT include a
#
at the start of it if you use slack – works a treat in IRC, but skip it for slack. I spent quite a while looking for a bug in the slack adapter before I figured this one out so it’s written here for me to look up next time! - Also note that your hubot can only speak in channels that it has joined; I have seen hubot actually crash when asked to speak in a channel that exists but which isn’t known to it.
I think this central way of having plugins which can integrate with many messaging platforms on one side, and integrate with many external APIs on the other means we’ll be doing much more in chat ops moving forward. Already I’m impressed by how many of the hosted tools I use have webhooks, although there aren’t hubot plugins for all of them (yet!).
Compiling PHP Extensions
- The extension isn’t available on pecl (e.g. uprofiler)
- The extension is on pecl, but you need the newest version or a branch with a particular feature or fix in it, perhaps for testing
- You are fixing an extension yourself (yay, we need more people like you!)
Related: If you followed my previous post on compiling PHP, be aware that in the php/bin/
folder there is a pecl binary that will install extensions correctly for whichever version of PHP it belongs to, so you may not need to read the rest of this post. However if you do, the paths follow on from the examples in that post.
I haven’t seen a really approachable guide anywhere, we tend to speak of extensions in hushed tones, and actually it isn’t particularly tricky so here is my quick how-to guide. Continue reading
Running Multiple Versions of PHP
Running Pull Request Builds with Jenkins
Easy Lint Check for JavaScript
PSR-What?
PSR
Let’s begin at the beginning. Once upon a time, at a conference, the lead developers from a selection of frameworks sat down in the same room (they are better at it nowadays, at the time I might not have believed it had I not been there) and agreed some standards for all their projects to use. The aim is to make PHP frameworks and libraries easier to combine for users, and so it was that php-fig: the PHP Framework Interop Group was born. This group of awesome individuals oversee the PHP Standards Recommendations (PSRs). Continue reading