Category Archives: osx

Use Apple TV without remote, without WiFi and without Home Sharing enabled

If you managed to lose your Apple TV remote, not have it connected to WiFi, Bluetooth is off and Home Sharing is not enabled so you can’t use the Remote App on your iPhone even if you use a network cable – there is still a way!

The key is that when you do a factory restore of your Apple TV, it enables Bluetooth and allow you to connect a remote keyboard. Get the OSX App 1Keyboard to have your Mac act as an Bluetooth keyboard and the connect the Apple TV to your Mac using a micro-USB cable and perform a factory restore.

After the factory restore is done, hook it up to your TV and use 1Keyboard to connect. Mission accomplished!

Command-line base64 encoding of file into clipboard

Often I find myself in the need to base64 encode a file. Typically an image to inline in a CSS file. I added the following to my ~/.bash_profile (OSX) for convenience:

function base64() {
openssl base64 < $1 | tr -d '\n' | pbcopy

Now I simply run base64 <filename> from the terminal to get the base64 encoded file in the clipboard for easy pasting into wherever I want to.