James Mackenzie

Dropbox as a GitHub Alternative

Programming, How To, Web Development

Mar 28, 2017

Want the benefits of private, distributed version control but don’t want to pay GitHub’s subscription fee? Or simply don’t trust GitHub with checked in passwords, tokens and secrets?

You can fashion yourself a quick and dirty solution using Git and Dropbox.

What you need

Step 1. Clone an Empty Repository

  • Decide on a folder name for your new repo
  • Clone it via git clone dropbox://</code>
  • This will create a new, empty directory in your local with all the necessary .git gubbins

Step 2. Write Some Code!

  • Get busy, write some code! Save it to your new local repo.
  • Or if you’re feeling lazy, just copy-paste the code from somewhere else.

Step 3. Add, Commit and Push

  • Stage the source code via git add
  • Commit to your local repository via git commit
  • Push to the Remote via git push

Step 4. Share and Collaborate

  • Want to collaborate with someone? Just use Dropbox’s built in Share feature.
  • Anyone you add can clone, add, commit and push too. Easy as!

Stop Wasting Time and Use Twitter to Stay Informed

Twitter, Productivity

Jan 8, 2017

Perhaps, like me, you spend far too much time reading news, blogs, journals. And you don’t like it.

Content doesn’t just arrive once a day anymore — it rains down continually. It’s easy to fill every spare moment with this shallow pursuit. Refreshing web pages and checking for updates. Moments that could be much better spent.

Going cold turkey might work for some, but I don’t want to disengage from news completely. I enjoy keeping up with current affairs. I just want to reduce my dependency. Minimize my reading time. Get the most bang for my buck.

It turned out the answer had been staring me in the face all along. Hiding in plain sight. Twitter.

No, I don’t mean Twitter the endless time sink, the bottomless scrolling list of doom. I mean Twitter the bountiful source of curated, low-noise news. This is what I mean:

Combining these into a Twitter List gives me my own personalized news feed. My cost of staying informed has shrunk to 5–10 minutes, twice per day — freeing up the rest of my time for deeper pursuits. I’m much happier with the new balance.

I hope this inspires you to reclaim your time too!

Raspberry Pi Headless Install

Raspberry Pi, How To, IoT

Jan 2, 2017

Don’t have an extra keyboard or HDMI cable? Here’s how to do a headless Raspbian install on your Pi.

Step 1. Download Raspbian image

Head on over here to grab a copy of the Raspbian image. The “Lite” version will do.

Download Rasbian

Step 2. Write image to SD card

Write the image to SD card. You can find detailed instructions here.

Write the Rasbian image using Win32DiskImager

Step 3. Add “ssh” file to the SD card root

Enable SSH by placing a file named “ssh” (without any extension) onto the boot partition of the SD card.

ssh file

Step 4. Boot your Pi

Pop your prepared SD card, power and a network cable into the Pi.

Raspberry Pi, powered up and ready to go

Step 5. Find your Pi’s IP address

To configure your Pi, you need the IP address. You can find this in your Router’s DHCP lease allocation table:

DHCP lease allocation table

Step 6. SSH into your Pi

Use your favourite SSH client (I prefer PuTTY) to access the Pi. The default credentials are:

username: pi
password: raspberry

SSH into your Pi

Step 7. Configure your Pi

That’s it! You can now configure your Pi via sudo raspi-config

Invoke raspi-config

raspi-config