Category: tools

Raspberry-Pi: Motion light switch

My latest little side project has been utilizing a Raspberry-Pi to turn on lights via motion detection. Here’s a quick run down of how I got this working. What you’ll need: – Raspberry Pi w/ Raspbian – Webcam – Hue lights – Motion (https://github.com/Motion-Project/motion) First things first, head over to the motion github page to get that installed on your Pi. This will do all the heavy lifting (why re-invent the wheel here?) as far as motion detection goes. Motion will let you specify a script to execute if it recognizes motion in a specific area of the screen or...

Android: Retrieve JSON from service via DNS SRV lookup

Quick snippet of code for anyone in need of an SRV lookup example. If your apps retrieve data from a service and you’re hard coding a URL, DNS is a great way to make that more dynamic. DNS Java is the library being used here (http://www.dnsjava.org/doc/). private static class ConfigUpdater extends AsyncTask<Void, Void, JsonConfig> { private static final String SRV_RUE_CONFIG_PREFIX = “_rueconfig._tls.”; ConfigListener listener; String request_url; String query_url; String username, password; String errorMsg; public ConfigUpdater(String url, String username, String password, ConfigListener listener) { this.username = username; this.password = password; this.listener = listener; query_url = SRV_RUE_CONFIG_PREFIX + url; errorMsg = “Failed...

iOS Tools [5.0+]: FXKeychain – The stress-free, easy to use Keychain wrapper

FXKeychain, by nicklockwood just saved me about an hour of brushing up on the latest changes to Apple’s already slightly complicated password manager library, Keychain. What would otherwise be a bunch of convoluted C calls with ARC complications and a myriad of other caveats, FXKeychain provides a ridiculously easy to use wrapper that resembles something intuitive that we should all be somewhat familiar with: Dictionary syntax. To insert a value into Keychain: [FXKeychain defaultKeychain][@”password”] = sipAuthPassword; To retrieve a value: [FXKeychain defaultKeychain][@”password”]; That’s it! Somebody give nicklockwood some love!

Raspberry Pi’s, Photons, and the magical world of Computer Engineering

Very often we can find ourselves in a career rut no matter the industry. We do the same things, learn similar skills to what we know, and are far too frightened to branch out to try something new. As a means of fighting complacency I’ve wanted for a long time to jump into the world of microcontrollers / hardware, but there has always appeared to be such a high barrier to entry. This article is for the Software Engineer who has been unsure of the hardware world but has an interest in giving it a go. My goal though this...

Android Project: Fork of Google “Meter” live wallpaper

Though I’m still working full time I couldn’t help but get my hands dirty with some code over our Christmas break. I wanted to create something I would use on a daily basis as well as have that “cool factor.” Thus spawned the idea of modifying Google’s data centric live wallpaper “meter” for Android. My fork currently adds a settings page that can be configured to do a GET from two URL’s and display that information atop of your Android Desktop. My initial use case for this is to display system status from my office and home Macbooks such as...

A challenge to the insecure entrepreneur: You gave me my career

I get it. Being an entrepreneur can be discouraging. In fact, it can very often end up costing you everything you own. Family and friends may not understand the reasons you pursue the things you do. They don’t see the vision, the greater picture. People say you’re crazy. My word to anyone who is discouraged with where they are at, overwhelmed with finances, or any other worries that have come your way because you chose to pursue your dreams is this: You gave me a career. The reason I can work a salary based Software Engineering position today and provide...

Android Tools: Simple HTTP RESTful requests using Volley

For as long as I can remember Android leveraged AsyncTask’s and HttpUrlConnection’s to perform network operations. The reason for this being is that any synchronous tasks performed on the UI thread would cause an application to hang until a response was returned. All of this extra code was a complete hassle and simply added unnecessary time to development. Google has made every Android developer’s life easier now by introducing the Volley maven library. Volley completely does away with all of Android’s woes, worries, and frustrations when performing HTTP requests. At a high level, http requests are wrapped in a Request...

Google Play: DropPin v1.5 out now!

What’s new? – Optimized location services (should remove any battery drain) – Added anonymous pin mode (classic) – Added popup window to save six pins – Context dialog to rename pins via long click – Context dialog to choose between navigation or deleting pins – Link to developer site (hire me!) Available on now Google Play.

Android-Tools: Butterknife (Maven Plugin for Android Studio)

As of this posting I have been developing on the Android platform for over three years and I cannot believe that I haven’t heard of Butterknife. Butterknife is similar to a dependency injection framework, but rather than injecting an interface Butterknife will bind an XML defined view id to a corresponding Java object or lamba callback without making petty calls to findViewById(). Butterknife accomplishes this in probably the most simple way possible. Below is an example of a bare bones Android Activity that demonstrates a simple binding on two EditText variables, a String resource, and an onClick listener.   As you can see,...