Screen Shot 2015-01-31 at 11.51.47

Write your WordPress posts in Markdown!

I’m probably not alone when it comes to frustration around the post editor system in WordPress…

I hate it when suddenly, a small change or edit to my blogpost, mess up the whole post by escaping certain characters, removing formatting or what have you.

Thankfully, there is a good solution to this! You can write your blogposts using Markdown instead of wordpress’ special text editor.

What’s Markdown?

Markdown isn’t new, it’s about ten years old, but it’s hard to beat Markdowns simple syntax for things like writing articles and blogposts.

Many editors support the format, and since it’s just a plain text document, it can easily be parsed or converted, to say a pdf.

Many developers use markdown as an easy way to write readme files and documentation for their projects. Markdown is used extensively for this purpose in projects at Github.

Markdown also support html, if you need to enter anything custom, such as embedding youtube videos, or adding images to your blogpost, via the WordPress media manager.

Continue reading

Screen Shot 2015-01-28 at 17.13.30

How to switch back to the old bookmark manager in Chrome

I was a bit suprised today, when I tried to bookmark a website in Chrome.

Chrome has apparently updated its bookmark manager. And for me, it has not gotten any better!

I don’t like the new card/tile listing of my bookmarks and folders, it makes them difficult to find at a glance, and it all looks just like a colorful mess…

chrome-new-bookmarkmanager

I wanted the old look back. The one with the simple list of bookmarks. I couldn’t find any list view options in this new bookmark manager, so I had to search the chrome experiments, and found this:

chrome://flags/#enhanced-bookmarks-experiment

Screen Shot 2015-01-28 at 14.59.40

Luckily, it’s just changing this “Enable Enhanced Bookmarks” option back to “Disabled” and restart Chrome.

logo

Setup your own (free) private VPN service on Amazon EC2 with OpenVPN

This tutorial will show you how to create your own VPN server on Amazon Web Services – Elastic Compute Cloud (in short: EC2).

A VPN service can be used for a lot of things, for example:

  • Testing your websites or services from another countrys ip
  • Accessing content on some sites with ip address block, such as hulu or netflix
  • Connect your computer and/or mobile phones and tablets that support VPN
  • Safely accessing internet on public unsecure wifi networks!

I find that last point especially important. A VPN connection can prevent someone from picking up your login details if you are using a public wifi network; If some of the programs/apps you are using, send sensitive data such as login details or cookies over http instead of https, the details can be picked up by others sniffing around on the network.

There are many different VPN services available, most of them charge a couple of dollars per month (e.g strongvpn.com charges $21 for 3 months), and many are often on shared connections, often giving you a slow or unstable connection.

By setting up your own VPN service, you can fully control access to it, and even allow others to use your VPN server. Depending on your level of skills, setting this VPN server up can take as little as 15 minutes.

Why Amazon EC2

EC2 is Amazons virtual servers in the cloud, where you can set up your own virtual private server (VPS). EC2 instances come in a lot of different sizes, and are charged hourly and by usage. You can of course set up a VPN service on almost any VPS, but heres the reasons why I chose EC2:

  • It’s widely available to everyone
  • They have a lot of services available from one web interface
  • They have a large library of Amazon Machine Images (AMI’s) which are predefined images with different setups, often making installation and configuration a breeze.
    (We will be using an AMI later in this guide)
  • It’s not the cheapest, nor the most expensive place to setup a VPS
  • They have something called “AWS Free tier” which is a great offer to newcomers, letting people try out the different services for free!

So basically, if you are eligible for their free tier, you can get a free VPS server for a whole year. With this, you can for example setup a VPN server like we are about to right now!

As an alternative, you could for example use a Linode VPS to create this VPN server on.

Continue reading

Android AVD with HW acceleration complaining about ‘memory exceeds the driver limit’

Having problem with the Android AVD manager complaining about the memory limit of your AVD when trying to boot an hardware accelerated android emulator?

Starting emulator for AVD 'android-avd-name'
emulator: The memory needed by this VM exceeds the driver limit.
HAX is not working and emulator runs in emulation mode

The problem is that the memory allocated by the device preconfigurations has been set higher than the memory limit you allocated to Intel HAXM when you installed it.

Change the RAM value under Memory options to a lower value, save the avd, and try starting it again.

avd-settings

When working properly, the emulator output should instead show:

Starting emulator for AVD 'android-avd-name'
HAX is working and emulator runs in fast virt mode

And the emulator should boot rather quickly.

Note: Remember to check the “Use host GPU” option for x86 images, and also remember to look for updates to your Intel HAXM installation, as it has been known to contain different bugs.

dialog-300x249

Creating a nice looking List dialog with images and text

This tutorial, will demonstrate how you can create a great looking selectiondialog, containing both text and images.

alt text

This list can then be used either directly in an Activity, Fragment, or as an Activity looking like a dialog. In this example, I will go with the latter, and create an activity that looks like a selection dialog window, that, in this case will be used to choose a country.

Creating such a selection list is easy if it should contain text only, but a bit more complicated if you also want to include images.

Continue reading