Category Archives: Programming

How to make one PDF from multiple images on macOS

Google the title of this post and you will get plenty of results, but all almost all of them steer you toward opening the image or images in macOS’ Preview app and exporting to PDF. Yes, this method works, but it doesn’t give you much control over the process, and it’s not scriptable.

Continue reading

macOS image manipulation with sips

macOS has long included a command line tool called sips. It’s a comprehensive image manipulation tool that can also be used to apply ColorSync profiles. Being a command line tool, it’s available to be used in scripts written to perform repetitive tasks.

A case in point: I regularly apply a fixed set of attributes — height, width, format, dots-per-inch (DPI) resolution — to batches of image files, and sips allows me to do that without firing up Pixelmator or Gimp to change each image individually.

Continue reading

How to build your own Apple iBeacon… with a Raspberry Pi

US department store Macy’s recently said it is implementing iPhone-based tracking tech the better to encourage browsing punters to buy. Of course, Macy has chosen to pitch this as an Apple technology – figuring, presumably, iPhone owners are more receptive to inducements delivered through technology and have more cash to splash than Android fans.

A Pi's UART pins, connected
Can this operate as an Apple iBeacon? Yes it can
Continue reading

How to program the Pebble smartwatch: Part 3

Update Pebble has released version 2 of its OS and this invalidates much of what follows, which was written for an earlier version of the OS.

As it stands, the app I created in Part 2 appears in the Pebble’s menu simply as a name, Ball, which is entered into the boilerplate PBL_APP_INFO created by the SDK’s create_pebble_project.py script. This also sets the app’s unique UUID, which you’ll see at the top of the file. You can also modify this to set the app’s version number and to add your name as author. But what’s really needed is a menu icon, and you can add one by editing the resource_map.json created for you in the /resources/src folder within the project folder.

Continue reading

How to program the Pebble smartwatch: Part 2

Update Pebble has released version 2 of its OS and this invalidates much of what follows, which was written for an earlier version of the OS.

In Part 1 we got our basic Pebble app up and running, but it doesn’t do very much. Let’s add some user interaction.

Continue reading

How to program the Pebble smartwatch: Part 1

Update Pebble has released version 2 of its OS and this invalidates much of what follows, which was written for an earlier version of the OS.

Pebble didn’t invent the smartwatch, but it has done more than most to bring this new product category to the attention of the world, largely thanks to its hugely successful and well-reported Kickstarter funding campaign.

Continue reading