Android: Fix Black Areas in Shape Drawables

When I first experimented with LayerDrawables, I thought something was broken in the way I was loading drawables and initialising the LayerDrawable.

image image

Here's what it looks like on Android 4.1 (API 16) and Android 4.4 (API 19)

For each background and border, I had a drawable defined in XML files. Upon testing the layers individually, the background was loaded fine, however the border drawable was causing the black from appearing.

Here's an example of "cell_border_event.xml" shape drawable:

<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="">
<stroke android:color="@color/cell_border_event" android:width="3dp"></stroke>

It seems that for Android 4.1 and lower, the shape drawables require a definition for the solid colour attribute. Prior to Android 4.4 the default was black.

<?xml version="1.0" encoding="utf-8"?> <shape android:shape="rectangle" xmlns:android="">
<!-- Android 4.1 renders this black if this isn't specified -->
<solid android:color="@android:color/transparent" />
<stroke android:color="@color/cell_border_annual" android:width="3dp"></stroke>

After adjusting this for all the border shapes, it now looks consistent.


Eh, looks about right to me.


Git: List and remove all remote branches which have already been merged

Sometimes you need to do some spring cleaning on your remote branches (such as GitHub).

To hell with doing it manually!

Fortunately it's an easy fix for us lazy sods.

List all remote branches which have been merged into master

git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | awk '{sub(/origin\//,"");print}'

Remove all remote branches which have been merged into master

git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | awk '{sub(/origin\//,"");print} | xargs git push origin --delete


It just works.


Homebrew via themehax / homemenuhax / menuhax on New 3DS

The 3DS homebrew scene has been flourishing lately. I never bothered with Ironhax and was too lazy to get around to trying out Tubehax, so now that Tubehax has been patched, the only other way left for New 3DS owners to get onto homebrew is via themehax.

This will work on any 3DS, Original or New from 9.x up to 10.3.0.

*update 12/01/2016* Now supports up to 10.3.0 and updated instructions as theme/home hax is now known as menuhax.



  1. Disable any custom themes on your 3DS by changing it back to default. menuhax does not work with it enabled (you can change it later)
  2. If you were you were using Tubehax before, set DNS back to auto.
  3. Extract the contents of the homebrew starter kit ( to the root folder of your (micro) SD card.
  4. Safely remove your SD card and put it back in the 3DS.
  5. Turn on your 3DS and make sure internet is enabled.
  6. Launch the Internet Browser app.
  7. Enter in
  8. IMG_20151019_223117[4] IMG_20151019_223145

  9. Click on menuhax installer
  10. Press A to install. It'll download some stuff.

  11. Once it's done, it should say "Install finished successfully." and tell you to press START.
  12. It'll boot back into Homebrew launcher.
  13. Now you're homebrew startup ready!
  14. Press start > A to reboot back into your 3DS.
  15. Disable the internet and turn off your 3DS.

How to use it?

When you start up the 3DS, hold the L button before the screen turns on.

It should kick you into homebrew mode right away.

Check out to check out some more homebrew apps.

I recommend blargSNES so you can have SNES games on the go, without cartridges!


The homebrew process is completely safe so you can revert at any time by removing the same files you added from your SD card.


Django: "AppRegistryNotReady: Apps aren't loaded yet" error after upgrading from 1.6 (to 1.7 or 1.8)

Depending on your setup, this might be a troublesome one to figure out. You won't see any error emails coming through since it doesn't hit Django code yet, just 500 error page when trying to view the website.

With the changes to the WSGI code in Django, some of us may have forgotten to update the WSGI dispatcher which is needed to glue our project to the HTTP server.

To fix the error, you'll need to open up your WSGI dispatcher file and change the following lines:

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()


from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

That should ensure that everything is smooth sailing again.



Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog