Of nothing in particular

by James Miller

PostedJuly 12th, 2016#Amazon#IoT

A lot has been written about how to hack Amazon Dash buttons to do your bidding. When Amazon announced their AWS IoT buttons, I immediately preordered one but I also purchased a regular Dash button to play with in the interim. My first thought about the whole ordeal was "Why buy the $20 IoT button when you can just get a regular dash button for much cheaper and hack it?" Turns out, there is at least one reason...

Reading a lot of blogs about how this is accomplished ahead of time, I got an idea for how it worked. Most made it seem like it was a fairly simple ordeal: Set up the button in the Amazon app but stop short of selecting an item for it to ship and voilà, you can then write a bit of code to monitor your network for button presses.

At the time I did this, none of the articles I read mentioned one particular annoyance with using the button this way. When you set up the button this effectively associates the button with your account. Now that it's associated with your account and because you haven't selected an item yet, the Amazon app will send a push notification to your device every time the button is pressed letting you know you haven't selected an item...

If you're anything like me, that would be incredibly annoying.

Item Not Selected Notification

Sure, you could turn off notifications for the Amazon app but I actually find the notifications it offers kind of useful. So that was a no-go for me. Another suggestion I've seen thrown around recently is to create a separate Amazon account and set it up using that account. That would work fine, but felt kind of overkill for the purpose it was serving for me.

I did take it as far as writing a Go app for toggling our Vera between home and away modes, but the notifications made it less appealing.

At this point I'm just waiting on my IoT button to ship in August and meanwhile using the button to (not) order over priced laundry detergent...

PostedJanuary 28th, 2016#D&D

A few friends of my wife and I have started a D&D campaign recently. I've played once before with some friends but I honestly had no idea what I was doing at the time which means I missed a lot of what makes D&D fun. With podcasts like The Adventure Zone and web series like Titansgrave, it ignited an interest in playing amongst a few of our friends. Now with a better understanding of the game, I was excited to tackle creating a proper character. Mostly though, I was looking forward to writing my character's backstory.

I created Kyrell Amari, an Paladin outlander that was part of a nomadic tribe before their disappearance.

I should point out that I rushed this backstory out over a night with only a few collaborations with my wife about how our character's met (my wife's character is the halfling Jack). That being said, the story is a little rushed towards the end and I'm sure there are plot holes the size of 747's in there.

Whatever though, I'm really happy with how it turned out and I'm actually considering doing some more, unrelated writing since I enjoyed doing it so much.

Kyrell Amari

The first thing you would notice about an Amari would be their stature. A strong tribe, the men and women stood tall and proud alongside each other. As a nomadic people, their stature was not without purpose. It gave them the strength to endure and thrive in the harsh winters and blistering summers they would encounter as they moved about The Realm. One would be wrong to assume their strength is the only attribute which sustains them though. With the ability to quickly adapt to situations, the Amari could use their strength and agility to get out of physical altercations and persuasion and intimidation to navigate complex social situations. It's no wonder the Amari thrived. However, with every sun rise there must also be a sunset and Kyrell walks in the darkness.

Kyrell was your typical Amari. Large in stature with long, braided blonde hair and blue eyes. He enjoyed traveling The Realm and being a part of the Amari tribe let him see it all. There are many Amari rituals that celebrate the transition of a child through different stages of maturity. By far, the most important of those rituals is known simply as The Undertaking. Amari are groomed to be self-sustaining from the day they can walk and The Undertaking is the ultimate test of all of the attributes that make an Amari tribes-person who they are.

At the age of seventeen, all Amari children leave the tribe to live alone in the wilderness. They must sustain themselves and return only after enduring each season in The Realm. During this time, the Amari wanderer is referred to simply as The Lost One. Only after navigating back to the tribe does the wanderer gain the title The Found. Unfortunately, Kyrell may never be Kyrell The Found.

Kyrell becomes The Lost One amongst much fanfare and well-wishes from his family and fellow tribesmen. With only the bare necessities to sustain him, he sets out on his own. The ensuing seasons are harsh. The Deepwinter nights nearly cost him several digits on his hands and feet. The Highsun threatened to dry him to the bone. Still, Kyrell endured. He became The Lost One during Summertide and by Summertide's return he would start his journey back.

The Amari's path through The Realm is predictable, but not entirely. Guided mostly by the stars, they use other means known only to the tribe to deviate slightly from their path to keep marauders from pinpointing their location while still allowing Lost One's to be Found. Kyrell begins his journey by simply gazing into the heavens and reading them like pages in a book. The story of his tribe’s travels is laid out before him and after reflecting on his journey, he takes his first step. A step not only towards finding his tribe, but his first step to becoming Found.

Weeks later, Kyrell nears the location of his tribe and quickly finds the markers they have left behind for him. Approaching their location, Kyrell knows something isn't right. The air has an evil stench about it and is silent. Dead silent. From a distance Kyrell can see that his tribe's campsite is devoid of all life. Everyone is gone.

It is not like the Amari to abandon their campsite. A people of enormous respect for the wilds, they only ever leave footsteps when migrating. Leaving an entire campsite would never happen under normal circumstances. Kyrell knows this and approaches with caution and surveys his people's campsite. The first thing he notices is that it doesn't look like there were signs of a struggle. Indeed, it looks like his tribesmen had no time to react to whatever overtook them. It appears as if they vanished into thin air.

Food and steins of ale for supper are waiting to be consumed. They are still hot. Armor and weapons are in chairs and on the ground where people would have been sitting. Cots are still ever so slightly warm against the cool night air from their now gone occupants.

The air is still.

Kyrell knows danger could still be near and takes refuge in a nearby tree to await whatever befell his tribe's return with no small part of him hoping this is a dream or a misunderstanding. He waits for days and knows the answer.

He will forever be Kyrell the Lost One.

Kyrell wanders The Realm for several years looking for answers anywhere he might find them. He finds only frustration and more questions. How could his tribe disappear into thin air? Was an outsider able to read the stars and their hidden markers to predict their location? Is there a chance they're still alive?

Kyrell's journey is forever changed after discovering a hidden temple deep within the High Forest. An explorer by nature, he easily penetrates deep into the temples inner sanctum. In an attempt to reclaim the temple, trees and plants have begun to take over the walls, floors, and ceilings of every chamber he passes though. The sanctuary, however, is the one exception. The entrance to the sanctuary seems to repel those who are not pure of heart and purpose and though the High Forest is seen as a noble entity to most in The Realm, it is not without flaws. Kyrell passes with ease.

As he approaches what looks like the temple's alter, flecks of light begin radiating from the many runes that adorn the temple. What at first felt like no more than moonlight soon begins to flood into the room in a torrent as he approaches the alter. It's brilliance is blinding. Kyrell begins to make out faint shapes moving in the light that begin to merge into, at first, several figures. Those figures soon coalesce into a solitary figure that dominates his vision, light pouring in from behind it hiding its features, until all at once the light crashes around him to reveal an Archon of Justice.

The Archon speaks to Kyrell in a language he doesn't understand at first. In a flash, he finds himself gasping for air as he feels his mind seemingly explode with activity. As he regains his breath he realizes he's no longer hearing just a forgotten language, he's understanding it.

The Archon tells Kyrell that what has befallen his family is of a truly evil nature and one that threatens many in The Realm. Archon's rarely intervene in affairs in The Realm unless they believe they can influence positive change in an indirect manner. The Archon explains to Kyrell that he will be a vessel for Justice within The Realm and that only through that pursuit will he discover the truth. Kyrell pledges himself to the Archon's cause. As the Archon begins to fade from view, it offers words that cause Kyrell to weep both tears of happiness and fear...

"Know that your tribe is alive but in danger. Neverwinter may hold the key you are looking for..."

The Archon disappears but Kyrell feels its presence with him. He is newly invigorated by his cause but fears what he may find. Bounding out of the temple, he aligns himself with the stars and heads towards Neverwinter.

Kyrell reaches Neverwinter in the late morning on a typical balmy day. His years as a wanderer have taught him to always be on alert for suspicious activity. Being on guard has kept him alive on more than one occasion. On this day, that suspicious activity came in the form of little girl walking alone down a Neverwinter street. A picture of beauty, her blonde flowing hair and dress made her easy to pick out amongst the merchants and street urchins that populated Neverwinter. Kyrell knew that a girl that young alone was asking for trouble and kept an eye on her as she passed and smiled at him.

Almost immediately Kyrell knows she's in danger as three men pass and tail her into an alley. Quickly finding an intersecting alley, Kyrell hides against the wall waiting for the girl and men to pass. They pass without notice. He stays in the shadows and witnesses the little girl hurriedly cast a sleep spell on the men in defense. Only one falls asleep while the others are caught off guard after being attacked by whom they thought was a helpless child. In a panic, the men begin to rush the little girl but not before Kyrell brings swift and absolute justice to the men, seemingly out of nowhere. Even the little girl is surprised and panicked.

"Oooookayyyyyy..." says the little girl, unsure how to process what just happened.

"What are you doing walking alone down an alley like this? Where are your parents?" Kyrell sternly demands.

"This is where I live. I don't have the luxury of parents." she says hurriedly, somewhat fearful of Kyrell.

"Then why aren't you in an orphanage? The street is no place for a girl as young as yourself."

"Mister, I appreciate what you did but an orphanage isn't the place for me. I'll be f..." Kyrell interrupts the girl and throws her onto his shoulder, his pauldrons easily supporting the weight of the tiny girl.

"I don't want to hear it. You're coming with me and we're getting you somewhere safe. There is an orphanage in Neverwinter, right? There's got to be an orphanage around here somewhere..." Kyrell says, unsure of both the task he's just undertaken and whether there's an orphanage anywhere in the vicinity. Kyrell has never been to Neverwinter.

He heads towards the direction he thinks the orphanage is only to feel the little girl leap from his shoulder. Kyrell attempts to grab her wrist and walk with her but the little girl resists with such strength that Kyrell is caught off guard.

"Look, you've got this whole situation wrong. I'm not a little girl." The little girl tugs at her hair and pulls at her dress. In the blink of an eye the little girl has transformed into a halfling man with platinum white hair. Kyrell is stupefied.

"You looked better as a little girl" Kyrell says snidely.

"Funny..." he says sarcastically, "the name is Jack."

"Kyrell Amari, The Lost Child of Archon" he says with pride.

"That's a hell of a name you got there."

"It suits me just fine. Why were you dressed up like a little girl?"

Jack brushed the question off "I'd rather not talk about it."

"In that outfit, I have a hard time believing you were completely unaware of what you were doing when they followed you down that alley. What were you trying to accomplish?"

"Listen, I don't got a lot going for me. I don't have a home, I have no money, I've lost my family... It's just me and this lyre and when music doesn't put food on the table, I have to resort to other means."

"Our pasts are not so different, Jack The Lost One..." Kyrell says in an understanding tone.

"Lost? Yeah, I guess you could say that..."

They sit for a few moments, contemplating the events that have lead them to this point in their lives. Kyrell understands Jack's loss and sympathizes, though he disapproves of these "other means" that Jack employs. Kyrell misses his tribe but sees something buried deep in Jack that he's been longing for. Something he lost when he lost his tribe. Kyrell misses camaraderie and sees potential in Jack's disheveled face.

"Well, I guess the orphanage is out of the question." Kyrell says jokingly.

"That would be awkward, so yes, out of the question"

"I don't have much to offer except my sword and a place by my side. I too am trying to find a place for myself in this world and I could always use some help. Maybe that'll get you off the streets for a while. Besides, being alone in the wilds for months at a time can make you a little... wild? Something like that. It would be nice to have some company."

Jack thinks for a bit but is not quite convinced. "Why would I run off with some random guy I just met?" Jack says.

"Because I lost my family also and if I never see them again, I'd like to know I have someone in this world I can call a friend."

Jack was silent, but he knew in his heart that he felt the same way.

"Alright, but on one condition..." Jack hesitated.

"What's that?"

"I get to hang out on that massive shoulder of yours. Deal?"


PostedAugust 29th, 2015#Alfred#Workflows

One of my favorite apps on OS X has always been Alfred. The number of things you can do with it is crazy and for someone who likes to fiddle with things and streamline cumbersome processes, it really is a godsend.

Over time, I've found some workflows that have been pretty useful and also created some of my own. A lot of them are pretty pointless to share (who wants a workflow to download their kid's daycare pictures? I didn't think so...) but a couple of them are helpful.

I put together a Github repository to store and share them. Right now I only have two in there but I'll add more as I clean some of them up and as others come to me. I've added one that allows you to generate GUIDs on the fly and another that toggles your bluetooth radio.

Generate Guid

It does just what it says on the tin. You can either use a keyword of "guid" which will simply copy a new guid to your clipboard or you can hit the hotkey Cmd+Shift+G and it will copy it to your clipboard and insert it wherever your cursor currently is. I find myself needing unique guids fairly often so this is pretty helpful.

Note: This workflow requires the uuidgen application. I think it was on my machine by default, but let me know if that's not always the case on OS X.

Bluetooth Toggle

This one is also fairly obvious. You can essentially use a keyword of "bt" or Cmd+Shift+B and it will toggle your bluetooth radio. I do this often so using the keyboard is preferable.

Note: This workflow requires the use of the blueutil applicaiton, which can be found here.

PostedAugust 15th, 2015#Go

The other day, while playing around with some Alfred workflows, I had the need to store small bits of data between workflows in a key/value fashion. In the past, I've used either environment variables to do so or something like boom by Zach Holman. I don't really like defining tons of environment variables for stuff like this, so boom was a natural fit.

After creating the workflow and adding boom to it, I ran into some issues related to running Ruby via an embedded Alfred script. The way Alfred runs scripts can cause some weirdness and usually involves the user having to source their .zshrc (or .bashrc) in order to configure their terminal to work the way they expect. After doing so, I still had some issues with Ruby and being that I'm not a Ruby guy in the slightest I did what any programmer would do... over-engineer!

I decided to create a clone of boom written in Go. It doesn't help that I've been looking for Go projects to work on lately and this was simple enough to bang out in a few days.

It's called goboom. Yeah yeah, the name isn't as snappy as boom, but we can't all be perfect can we? Many of the commands are the same and, assuming you've used boom in the past, it uses your existing .boom file as its data source.

A bit of warning though... I just "finished" this and I'm still working out the kinks, not to mention adding better test coverage. That being said... make a backup of your .boom file if you choose to use goboom. I have no reason to believe any data loss is occurring, just better to be safe than sorry.

PostedJuly 31st, 2015#Go#IFTTT

The other day, I noticed that IFTTT has added a new channel called the IFTTT Maker Channel. The premise being that you can send a POST or GET request to IFTTT to trigger a recipe. This opens up IFTTT quite a lot if you want to do some really custom work without trying to shoehorn a combination of workflows into producing some desired result. A few days later I also noticed they released a Spotify Channel, something else I'd been hoping for.

For a while I'd wanted to create a dynamic playlist that grows as people recommend music from various locations around the web like r/music and r/listentothis. With the addition of those two channels, it becomes fairly easy.

That being said, I put together a small library named Go-IFTTT-Maker for posting to the IFTTT Maker Channel and threw it up on Github. All it does is provide an object that accepts the three arguments you can pass to the Maker Channel and a Send method that accepts your API key and the event you're posting to. That's it. Here's a simple code snippet.

I've already made a few applications from this library that I might throw up on Github soon. One for calling the IFTTT Maker Channel from the command line and another that transfers music recommendations to a Spotify playlist. The former is nice if you want to create some really custom recipes from your machine.

If you're at all interested in that Spotify playlist, it's also available here.

James Miller