Check available diskspace on Ubuntu (CLI)

If you are running an Ubuntu (or other linux) commandline interface, you might have to check how much diskspace is available on the system. You can easily have the system output a list of the disk space usage on all mounted filesystems with the command df -h.

The output depends completely on how your system is set up, but it will look something like:

Read More

Setting up the PiFace Digital with Raspbian/Minibian

pifaceUnconnectedThe PiFace Digital is an I/O expansion board for the Raspberry Pi. It has to be installed by plugging it on to the GPIO of the Raspberry Pi. The PiFace website has its own guide which tells you how to set up the PiFace. I’d also like to provide you with my own guide to do this on Raspbian or Minibian.

Before proceeding, you should make sure you have executed step 2 and 3 of my first steps guide for Minibian. If you are logged in as an account other than the root account, you should add “sudo” in front of all of the commands described in the guide. If you are running Raspbian with a desktop environment, you have to open a command-line terminal window first.

Read More

Minibian, first steps!

Congratulations! You are now running Minibian on your Raspberry Pi! But what do you do now? Regardless of your goal for the Raspberry Pi, there are a few things you should do before proceeding after you first install Minibian. (Or any other operating system for that matter).

Step 1: Change your password!

Minibian comes with a root account named “root“, with the password “raspberry“. Like you would on any system, it is fairly imperative that you, at the very least select your own password. It is possible to set up your own user account which can be elevated to root privileges only when needed, and at the same time just getting rid of the password for the root account all together. But to keep things simple, let us just start by setting a custom password for the existing root account. To change the password, log into the system and simple type “passwd” into the command-line interface. You will be asked to enter your new password and a second time afterwards to confirm it. The reason why this step is so important, is that the root account has the ability to access and modify the entire system. If someone else gains access to your device’s root account, they might damage the software or even the hardware.

Read More

Installing Minibian on the Raspberry Pi

Raspi_Colour_RAs far as Linux flavors go, I’m a Debian fan, running Ubuntu where ever I am able. So I like to run Raspbian, or more specifically, Minibian on my Raspberry Pi. What is Minibian you ask? The Raspberry Pi Foundation provides its users with the Raspbian image. Raspbian is a port of the Debian operating system, using the LXDE window manager. Its purpose is to provide a clean lightweight desktop environment which users can install onto their Raspberry Pi. Like me, many people don’t need or want a desktop environment running on their Raspberry Pi. Even through it is fairly lightweight, even LXDE will eat CPU power, memory and disk space. One option is to remove all software packages you don’t want from the Raspbian image after you have installed it. I will be using the Minibian image instead. It is a minimal image based on Raspbian for the Raspberry Pi, which strips all of the software you don’t need, including the desktop environment. Any packages you are missing, you can install later on.

Read More

PiFace!

pie-faceMy PiFace is here! I ordered this two days ago from the Dutch retailer Minifo. I won’t lie, ordering it was a fairly trying experience. Their website responded rather sluggishly and when I first tried to order, it failed to open the payment gateway, leaving me with an open unprocessed order on my account, which I can’t do anything about. They also only offer free shipping starting at a €100 order. But I can’t argue with the delivery. It was delivered within 2 days as promised.

RPi-PiFaceI’m looking forward to playing around with this, I’ve had a Raspberry Pi since it was released, as I had pre-ordered it, but it has just been gathering dust in one of my “computer related stuff drawers”. I might post some things about the Pi and the PiFace on this blog as I go along. As usual, probably notes and tips I find useful myself.

 

Read More

Merge upstream changes with Git

Let’s say you want to work on some code in a git repository. To do this, generally you will “fork” this repository, by cloning it into your own repository. On GitHub there’s a simple “fork” feature that takes care of this. After a while, you might have made some changes, but the original repository that was forked might also have new commits pushed to it. A question many new git users then face is: “How do I pull the upstream changes from the original repository into my own?”

Read More

WinMerge as mergetool with Git(Hub) for Windows

WinMerge is a great free tool for merging conflicts when working with a version control system like Git or Subversion. To use it with Git(Hub) follow the following steps:

  1. Locate your .gitconfig file. If you’re using GitHub for Windows, you will certainly find it in your user folder.
  2. Add the following text at the bottom of the file:

    If you’re still using a 32-bit version of Windows, Replace “Program Files (x86)” with “Program Files”.
  3. To merge a conflict, open a shell and browse to your repository’s root folder.
  4. Use the command git mergetool to merge the conflicts with WinMerge.
    If WinMerge doesn’t open, Git might still be trying to use a different tool, try again with git mergetool --tool=winmerge.

Read More

Delphi: Absolute

You don’t often come across a piece of Delphi code that uses the keyword “absolute”. A lot of Delphi programmers consider it to fall in that “stay away” category, like “goto”. The keyword, when used correctly can however be very convenient and improve the readability of your code.

The absolute keyword allows you to define a variable that points to the memory location of another variable. This is something you can achieve with pointers as well, but the absolute keyword allows you to do it very cleanly in a single line of code.

Read More

Review: WeBuilder 2014 in retrospect

A while back I made a post about the PasteLock service I’ve developed and published. It took me quite a while to develop the service, mainly due to the fact that I am not a webdesigner, I’m a webdeveloper. As such, I usually open up Adobe Dreamweaver to develop anything that requires HTML and CSS work. Why Dreamwaver? You must be cringing if you think I need a WYSIWYG editor to create a website. This is not the case, but I like to see what I develop when I develop it.

Unlike before I decided not to go with Dreamweaver for once and try something new. I came across a web development suite that seemed to meet all of my requirements. WeBuilder 2014, still in beta at the time, had all of the tools I needed, like syntax highlighting, extensive code completion, a live browser preview and even support for PHP debugging. As I was immediately won over by the extensive feature list, I decided to give it a try.

Read More

Installing Imagemagick or GD (Ubuntu 12.04)

If you’re working with PHP software, you’ll often need image processing software to support complex processing of images in PHP. Most commonly, you will be using the GD or Imagemagick libraries.

To install Imagemagick on Ubuntu for PHP:

To install GD on Ubuntu for PHP:

Read More