Apple bluetooth keyboard disconnects, and won't reconnect

A few times now, lucky me, have experienced that the bluetooth Apple keyboard is disconnected, and not working. It has happened after putting my MBPr 15 into sleep, and when waking it up, the keyboard will not automatically reconnect, as it should. Also, to top it off, the bluetooth settings in OS X seems to have frozen, as it does not respond anymore. You simply cannot turn off bluetooth, to try and reconnect the keyboard! The first thing I tried,

» Read more

Connecting your Android device to an OpenVPN server

This is a follow up post from the previous one, which walked through setting up an OpenVPN server on your own Amazon EC2 machine (for free!). So, assuming you already have the server setup, lets continue by connecting an Android device to the OpenVPN server. Create a new user Navigate to the admin page of your OpenVPN server: https://<machine_ip_adress>/admin/ (Your browser may warn you about the https certificate safety issue, since we have not

» Read more

Syntax highlighting in your Ghost blog with Prism.js

To make code and markup such as XML and HTML easier to read on a website, you should use syntax highlighting. Ghost does not have built in syntax highlighting out of the box, but its quite easy to add it! Theres a library called Prism.js (by Leah Verou) that can add such a feature to your website. Setting up Prism Go to the prism download page, and select a theme, and which languages you would like highlight support for.

» Read more

Mongoose Dates and Mixed objects not being saved to database

If you are working with Date or Mixed type objects in Mongoose you may notice that some objects are not always saved to the database, like they should, even if it looks like it just worked. The Dates and Mixed types in Mongoose, are not attached to Mongoose' change tracking system, which means for any changes you make to those fields, they have to be marked as changed. From the documentation on SchemaTypes: Built-in Date methods are not hooked into

» Read more

Sorting with RuleBasedCollator may stop working in Android 5.0

If you are using the RuleBasedCollator in your app, you may get NullpointerException for your collator object if you do not properly initialize its constructor with a correctly formatted rule string. In Android 5.0 and later, the constructor expects to get a rule string that has a reset character in the first rule chain. Refer to the documentation: Note: earlier versions of RuleBasedCollator up to and including Android 4.4 (KitKat) allowed the omission of the reset from the

» Read more

Customize the favicon of your Ghost blog

To use a custom favicon for your Ghost blog: Copy your favicon.ico file to the /assets folder inside your theme folder (/blog/content/themes/themeName/assets). Open the default.hbs file of your theme On line ~15 replace <link rel="shortcut icon" href="{{asset "favicon.ico"}}"> with <link rel="shortcut icon" href="{{asset "/favicon.ico"}}"> Save the default.hbs file, and refresh your blog. That's really all there is to it. Ghost uses this default

» Read more

Detecting Actionbar Home button press event

You can use this method to trigger something when the home or "up/back" button in the actionbar is pressed. For example, save what the user is currently doing or writing. You can listen for the Home button pressed event in the optionsItemsSelected method: @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: { doSomething(); return true; } } return super.onOptionsItemSelected(item); } Returning true after executing your method, "consumes" the event, so it does not propagate further.

» Read more

Add an "Edit" link to your blog posts in Ghost

A thing I was missing after switching from Wordpress to Ghost, was the "Edit post" link on each article, which was only showing if I was logged in. It's easy to achieve the same thing in Ghost too. Heres how: Include this javascript in your default.hbs file, somewhere before the {{{body}}} tag, either as file include, or just inline linke this: <script type="text/javascript"> var sessionKey = "ghost:session"; function getLocalStorage(key) { var item = localStorage.getItem(key)

» Read more
Author image Tagged Ghost

Switching from Wordpress to Ghost blog engine

I have now taken the plunge, and migrated away from the clunky Wordpress, and onto a new world of asynchronous javascript, Markdown and minimalism! Wordpress was getting more in the way, instead of making it easier to write blogposts. I ended up writing my posts in markdown in Mou, before posting it directly in Wordpress, instead of using their WYSIWYG editor (which usually just screws up my formatting...) I am so sick of Wordpress' wysiwyg editor ruining my formatting with

» Read more

Ambient Temperature App reaches 100 000 installs!

My Ambient temperature app for phones with a real temperaturesensor, has now reached 100 000 downloads! The app is 100% free, it does not contain ads, nor does it require any permissions! Why it’s free You can get it (completely free) here, in Google Play! I made the decision to give it away, so as many people as possible would be able to try it out. The app has been rated over 1000 times now, and has an Average

» Read more