Here’s a simple pure CSS, plus to minus icon transition. The code is a mixin in SCSS, and currently transitions on
:hover, but the
:hover can be changed to a class like
While investigating various options for a managed database solution on Amazon Web Services, I came up with an idea: What if we use Amazon’s S3 file hosting solution as a database? My requirements was that it should be a document database and it should run as cheaply as possible.
For the past year or so, my BLEduino laid dormant in the cupboard. Yesterday, I decided to break it out for a new project. While I used Arduino 1.0.x for the BLEduino previously, I now have Arduino 1.6. Unfortunately, I discovered that BLEduino isn’t compatible with it – The hardware core files were for 1.0.x only. I tried to use 1.0.6 on my Mac OS X 10.11, but every time I tried uploading a sketch, the following error occurs:
processing.app.SerialException: Error touching serial port '/dev/tty.usbmodem1421'.
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
... 7 more
A search on the internet seems to indicated that this was a bug in the Arduino IDE, fixed in 1.5 later versions. I decided the only way to resolve this issue is if I port the hardware core files from 1.0 to 1.6. Luckily enough, Arduino wiki provides a handy migration guide. Within half an hour, I got BLEduino working on Arduino 1.6. I’ve posted my changes on GitHub, for anybody interested: BLEduino Arduino 1.6 hardware files. Hopefully, someone finds this useful.
The versatile log4j is a popular logging framework for Java. Log4j 2 brings new advanced features and extensibility. Unfortunately, out of the box, it’s not very Android friendly. I spent a good day trying to perfect the usage and integration. Given the difficulties and workarounds required, I would hesitate to use Log4j2 for any Android project. This blog post is part commentary, part guide. If you really want to use it, check out my log4j2-android github for an example project. Hopefully this helps somebody out there.
The Light Blue Bean built by Punch Through Design is a versatile Arduino device with Bluetooth Low Energy (BLE) built in. The Bean’s default 3v battery could typically last a month when running a minimal sketch. A door bell button is possibly the simplest arduino device you could possibly build. A press of the button would notify an android device through BLE that someone is at the door. This post will provide an idea on how this could be built using minimal power (on the Bean) and minimal code.
So after installing Visual Studio 2015 Update 2, my Xaml Designer decided to stop working. Every time I open the designer by clicking on a xaml file, it would show an error dialog that says “Visual Studio has encountered an unexpected error.” – not very helpful. Going to the menu, Options > Xaml Designer > General property page would yield an error “An error occurred loading this property page”.
I then tried re-installing Visual Studio 2015. Same issue. I then tried opening Expression Blend, it doesn’t work, but I got a some more interesting clues – it tells me to check ActivityLog.xml – In it, there was a telling error:
SetSite failed for package [XamlDesignerPackage][This access control list is not in canonical form and therefore cannot be modified.
Basically my permissions were corrupted somewhere in some file. I had a hunch. A test by logging on to a fresh Windows user account and opening VS xaml editor confirmed that the issue was limited to my profile account. I tried remove all traces of Visual Studio from profile but removing the obvious AppData folder didn’t fix the issue. There were just too many places it hides files. As a last resort, I reset all permissions on my profile folder such that I was the owner and had write access and surprise! it works!! Now I know what to try next time.
Following my post on setting up Let’s Encrypt with nginx, I experimented with installing the certificates from letsencrypt on my mail server. It was surprisingly straightforward. The key was that the verification of the domain, which requires port 80 or port 443 to be accessible on the host of the mail server. I run a secure mail server with Dovecot and Exim. Since on the server, nothing was hosted on port 80, I used the standalone plugin that runs a temporary standalone HTTP server for letsencrypt / certbot to access:
A few days ago I enabled HTTPS and SSL/TLS on this blog. A big barrier to enabling SSL on your website is the cost of the SSL certificate and the maintenance overhead of having to constantly renew your certificate. You could already get free SSL certificates with StartSSL, but the process of obtaining the certificate is still a manual process. A few months ago Mozilla and a bunch of companies came together and created Letsencrypt, a service which issues free SSL certificates that are automatically generated with a command line tool. When set up correctly, it alleviates the need for manual intervention. As of the writing of this blog post, the service is still in beta and support for Nginx is minimal, but it’s not difficult to set up.
For the past few days, my newly installed Visual Studio 2015 would randomly crash, naturally at the most inconvenient of times. In the 10 odd instances I could notice no discernable pattern to the crashes. It seems to happen randomly but consistently.
2015 comes with a new feedback feature in the form of smilies. You can send Microsoft a smile or a frown. I have been sending frowns every time the crash happened. Whoever opens and reads this frown would have seen my increasingly desperate messages.
Dagger, a Java dependency injection framework, has just released version 2.0 and I thought I would try my hand at migrating my Android app, which is using 1.0, to the new version. It took me a few hours on an small-ish app with 3 activities, 6 fragments, 3 singleton services and 2 dagger modules (Application-level and activity-level). This was mostly because I used a fair bit of time banging my head against a brick war. To be fair, 90% of the conversion was smooth, but the 10% really had me lost. I will lay out some of the brick walls I ran into. The Dagger 2.0 website already have a migration guide which is good starting point. This blog post is meant to be a supplement to that.