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

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

» Read more

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… I wanted the old look back. The one with the simple list of bookmarks. I couldn’t

» Read more

1 and a half year of free LastPass Premium

Two promo codes have surfaced, that gives you an extra 18 months of free LastPass premium! You can use the codes if you are a new user, or an existing user. If you don’t have an account already, you can sign up via this promo code. Check out the article over at Android Police for free premium.

» Read more

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

» Read more

How to create simple view separators

This will show you three ways to create nice looking view separators, to use between a row of buttons for example. The examples shows a LinearLayout with three buttons, that should get separators in between them. The third example may be the easiest one to implement, while the other ones gives you better customizability. Method one – Manually adding a view separator to the LinearLayout We can create a simple View that represents the separator, and just add it in between

» Read more

How to fix ArrayIndexOutOfBoundsException in your custom ListAdapter

If you are creating your own ListAdapter, perhaps you want to show different list items, or list item headings in your list by overriding the getItemViewType and the getViewTypeCount in the implemented Adapter class, then you may have come across the ArrayIndexOutOfBoundsException, as the example below: ERROR/AndroidRuntime(400): FATAL EXCEPTION: main ERROR/AndroidRuntime(400): java.lang.ArrayIndexOutOfBoundsException ERROR/AndroidRuntime(400): at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:4540) ERROR/AndroidRuntime(400): at android.widget.AbsListView.trackMotionScroll(AbsListView.java:

» Read more

Using fail2ban to block Wordpress login attempts

If you are being brute force attacked by someone trying to login to your website, more specifically your WordPress blog, you could certainly block them in the firewall by their ip adress, with iptables like this: iptables -A INPUT -s 13.22.33.12 -j DROP However, this gets quite cumbersome to do everytime your site is under attack, so the best solution would be to have an automated blocking system.  This is where fail2ban comes in. Using fail2ban to

» Read more

Android string.xml resource formatting

If you are using the strings.xml file for your applications string resources (which you should!) then you might have wondered what to do if you need to combine a string and a value. Take this text for example: Hi, my name is Ruben and I am 26 years old String resource formatting This can easily be solved by using string formatting to insert the values; Ruben and 26. In you strings.xml file, create a new string resource like

» Read more