Archive for the ‘Everything Else’ Category

On a Roll with jQuery and Bootstrap

Wednesday, May 6th, 2015

JQuery Framework

OK, since I was on a roll with the work I was doing at The Shop, it made sense to keep going and apply it to putting a web front-end on the CryptoQuip solver a friend and I have been working on. The solver is all Clojure, and so it took just a few tweaks to get all the static files in-place and ready, and then getting the POST working was really the challenge.

Turns out, the way to get it to work was:

  function solveThePuzzle() {
    console.log("attempting to solve the puzzle");
    // get what we need for the call...
    var inp = {};
    inp.cyphertext = $("#plaintext").val();
    inp.clue = {};
    inp.clue[$("#key1").val()] = $("#key2").val();
    // make the call to solve the puzzle
    $.ajax({type: "POST",
            url: "/solve",
            processData: false,
            contentType: 'application/json',
            data: JSON.stringify(inp),
            success: function(resp) {
              var cont = '<div class="alert alert-success" role="alert">';
              cont += '<strong>Solved:</strong> ' + resp.plaintext;
              cont += '</div>';
              $("#status").replaceWith(cont);
            }
    })
  }

and the results are very nice:

better colors

Moved to Adium 1.5.11b2

Wednesday, May 6th, 2015

Adium.jpg

The nightly builds of Adium 1.5.11 are nice, but they are getting a little unstable with the new OAuth2 GTalk credentials - like having to re-do them when awaking from sleep. So I found that the latest Adium 1.5.11 beta is pretty recent (2015-04-16), and it works with all the services I need, and I've kinda given up on MSN coming back to life... so why go through the pain of the bleeding-edge?

None that I can think of.

So it's back to the straight beta for now. Nothing against the nightlies, and I may go back if they get MSN and GTalk stable, but it's just not worth it today.

Rainy Walking into Work

Tuesday, May 5th, 2015

Umbrella

This morning it was one of those days where I knew it was going to be a rainy walk from the train station to work. It was raining before I left the house this morning, and so I dressed accordingly, and carried my umbrella.

Generally, I don't mind rain. If rain were my biggest problem in life - I'd be leading a charmed existence. So I knew it wasn't a matter of if I got a little wet, it was really the wetness factor I was contending with. It wasn't a particularly warm rain, so I was glad I had my raincoat that's a pretty warm one - considering, and it kept the wicking to a minimum.

I got to work and realized that my umbrella had been a casualty of the rain - one of the rivets connecting an arm to the spreader had popped, and so I needed to see about fixing that. I gave it a good once-over, and thought paper clip. I walked over to the office supplies and picked up two - one a little bit bigger than the other.

I then sized it up, bent it back and forth several times to cause a fatigue crack, and then went about the fixing. I was able to put the "pin" through the spreader, and then the arm, and then used the handle of my scissors to bend it back on itself to keep from falling out. I was pretty impressed with the fix! It looks like it's going to hold for quite a while.

Still... I'm going to have to get a new umbrella soon. These large golf umbrellas are just too handy to not have one (or two) right there by the front door.

Being Thankful for the Little Things

Monday, May 4th, 2015

Path

This weekend, Pastor Ross spoke about Philippians and how sometimes we need to be thankful and grateful for what we know will come - before it comes. And I know I've had many times in this chapter of my life where I've been unable to find the happiness in my life - but I can honestly say that I can't remember even once when I felt God had forsaken me.

Teaching me a lesson? Sure. The Bible is filled with stories of people that messed up and had to deal with the consequences even when they were profoundly sorry. So yeah... there have been a lot of times like that for me. I'd search my memory for things I did wrong - face it, it's pretty easy for all of us to remember when we did something we shouldn't have - and feel that was the source of the pain.

But I never felt that I was alone. Sad, in pain, isolated, punished - sure... all that and more, but not forsaken. Never once.

So I'm trying to be thankful for what might seem like the little things in my life. In reality, they aren't the little things they are the Timeless Things. Those things that are all around each of us that have the ability to make us smile... to make us stop and take pause for what they are.

This weekend it was the light coming through my bedroom window in the morning. It was just amazing. Simple, clean, just exactly how I wanted my bedroom to look, and with this amazing sunbeam coming through the white curtain I had hung my first weekend in the house, and spilling onto the bed. It made me smile.

Then later, I was talking to myself as I walked around the house, and when I walked into my bedroom, the echo changed, and it because what I can only really describe as "safe" and "protecting". At least that's how I interpreted the sound. I knew this house wanted to protect me... wanted to give me a place to feel safe and secure. Buying this house had been difficult. I had to keep fighting for it with the Bank. But as I look back now, it was one of the best decisions I've made in my life.

So there are a few things I'm very thankful for. The sunlight, and the house. I don't think of this as my house - it's more than 100 years old. I'm just the current caretaker. When I'm gone, this house will still be here, and it'll be someone else's. It's just letting me stay here for a while. I appreciate it very much.

Life is what we make of it. It's hard to remember when you're getting beaten up, but it's true. Some times it's a lot easier to have that view than others.

The Cost of Keeping a Promise

Friday, April 24th, 2015

Path

Yesterday was a very bad day for me. Yeah, to be fair, it's just one more in a long line of very bad days, but they tend to have a cumulative effect... after more than 5 or 6, it gets really hard to have the reserves that you had before the first. I'm not going to get into what it was, or anything like that - it's not the important point right now. What is important is that this morning I realized that it's just the cost of keeping a promise.

And yeah... it's just that simple.

A few weeks ago, I promised the CEO, in response to his worry about hitting a delivery date, that I would guarantee completion - but I had to be able to do it my way. It would work, and it would be stable, and flexible, but I couldn't be forced into another language, or another platform, etc. He agreed, and from that point on, even sub-consciously, I was working on that promise. When a new manager appeared, I assumed he was here to assist me. He believed he was here to implement his vision.

He didn't like that I wasn't willing to do just exactly as he said. I can even see his point of view - if it weren't for this promise I made. I should have told him right then and there of the promise, but I didn't want to make it more complicated than it already was. He wasn't interested in me liking his decision, he just wanted me to do it. That attitude just seemed wrong for the fact this was his second day.

But back to the point. This promise I made put me in the cross-hairs for his anger. It made me look to some like I wasn't being responsive - or even responsible. I was even painted as insubordinate. And what I realized this morning was that whether or not this was true, it was the cost of keeping the promise.

When I talk to the CEO and this new guy next, I'm going to ask the CEO if he wants to release me from this promise. If he does, then I'll do just what the new guy wants. Because then it's not my promise that's on the line. And it doesn't matter that the new guys says it's now his problem - the promise was from me to the CEO -- the new guy doesn't enter into the picture at all.

A great scene from Rob Roy:

Son: Father, will the MacGregors ever be kings again?
Robert Roy MacGregor: All men with honor are kings. But not all kings have honor.
Son: What is honor?
Robert Roy MacGregor: Honor is...
[Mary looking on]
Robert Roy MacGregor: what no man can give ya. And none can take away. Honor is a man's gift to himself.
Son: Do women have it?
Robert Roy MacGregor: Women have the heart of honor. And we cherish and protect it in them. You must never mistreat a woman, or a lame man. Or stand by a see another do so.
Son: How do you know if you have it?
Robert Roy MacGregor: Never worry on the getting of it. It grows in you, and speaks to you. All you need do is listen.

That's it. A promise is a promise - no matter what. Even when it's costly.

Upgrading Postgres 9.3.4 to 9.4.1 Using Homebrew

Monday, April 20th, 2015

PostgreSQL.jpg

This morning I didn't have a lot going on, and I decided to upgrade my laptop from Posgres 9.3.4 to 9.4.1 as there are a few little things in 9.4 that are nice, and I've got 9.4 on my work laptop, and I figured this would be an easy upgrade - like super easy... I was mistaken.

The rules about automatic upgrades for Postgres is a bug release version change. I thought it was a minor release. So I was expecting to simply shut down the server, upgrade the packages with Homebrew, and then start it back up. The code would detect that it was the next minor version, and automatically update the data. Sadly, that's not the case. It's a big upgrade, and that means that I might as well do a complete dump/load.

Sadly, I didn't do a dump, so I'd have to live with an older version. Not a tragedy, but annoying when I'm in the middle of the upgrade process only to learn that it's not going to work. So it goes...

So here's what I had to do - in the right order to get things working. Not bad, but it's basically the instructions for a dump/load, so I'll assume we know this going in.

First, create a complete dump of the database. Assuming that all these things are installed on Mac OS X, and using Homebrew, the paths are not important - they are all fixed with Homebrew, anyway.

  $ pg_dumpall > dump_file

Next, shut down the running server, update Homebrew, and then upgrade postgres within Homebrew. Just to be safe, let's re-link the launchctl file because in this case, it has changed, and better safe than sorry.

  $ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
 
  $ brew update
 
  $ brew upgrade postgresql
  $ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

At this point I need to move the old database data to the side, and then initialize the database with the new codebase. Once that's done, we can then restart it with the re-linked launchctl file.

  $ cd /usr/local/var
  $ mv postgres postgres.old
 
  $ initdb -D /usr/local/var/postgres
 
  $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Finally, we need to load up the entire database from the dump file we made in the first step.

  $ psql -d postgres -f /path/to/dump_file

Check and make sure that everything looks OK and then you can easily remove the old database directory:

  $ rm -rf /usr/local/var/postgres.old

That's it.

Keep Going… Just Keep Going… and Try to Do Good

Monday, April 20th, 2015

Path

These last few weeks have been up and down, and I feel certain that it's going to get a lot worse before it gets any better. My back set me back - a herniated disc - nothing you can help, I do all the stretching and exercises, it's just life. But I was down for a few days last week. I'm on the mend, thanks to this not being the first time it's happened, and in a few weeks I am sure I'll be better. But it's a blow...

I also had a run-in with family this past weekend and while I love to see them, I know that they stiller unhappy with me - kids of divorce are something I'm very familiar with. It is what happens... sides are chosen... blame is assigned... it is what it is, but it also hurts. Again, in a few weeks, this will all be a memory, and things will seem to be back to "normal".

It's really just giving things time to become The Past. I've heard that over and over again in the last few years, and every time I hear it I'm hurt that it's the only thing anyone seems to say, but then 6 months later, I realize that it's the only thing they could say. It's an honest assessment of what happens when people get hurt.

Bones need time to heal. Discs need time to stop swelling. And the heart needs time to let things go. There's no pill to heal a bone... and while the prescription to reduce the swelling on my disc is really useful, I know that given time, it would go down on it's own. It'd just take a lot longer. And when people hurt each other, no words are going to shorten the time it takes to get past it.

I just need to keep going... get up in the morning. Try to do some good in the day. Have a good, healthful, lunch. Walk like you mean it. Get involved in your work, in your life. These don't really make anything better - they just make it a lot easier to pass the time. That's what really needs to happen. But these make the time seem to pass faster.

I just have to keep at it.

Adium 1.5.11b2r5922 is Out

Monday, April 20th, 2015

Adium.jpg

This morning I checked on Adium, and thankfully, the maintainers have released a new build - 5922, which is fixing some things I'm sure are important, but the big thing I'm looking for (most likely in vain) is connectivity to Hotmail IM again. It's now being called MSN Live, and even that is supposedly going away in favor of Skype - also owned by Microsoft.

And I'm told that the libpurple changes for Hotmail IM are in and are related to a usage key - like so many authentication schemes are, but that the Adium guys haven't updated the code to use the latest libpurple and until they do, it's going to be dead.

Maybe this doesn't matter... Microsoft bought Hotmail and Skype, and they are free to shut down whatever they way - it's their property now, and it's all up to them. It's just sad that they bought it for it's visibility in the market, and then they let it deteriorate to the point that it's name is trashed, and then they can drop it. It's kinda predatory, if you think about it... but no one forced Hotmail to take the money. It's just business.

Anyway... I'm hoping it gets fixed, or that a really great IM tool comes up. If not, I'll have to get the code and figure it out on my own as I really like this tool.

The Power of Friendship

Thursday, April 9th, 2015

Path

I was chatting with a friend today, and they are having a rough time, and feeling very much unlike themselves. Up and down... slight depression... things that are so very unlike this person it is amazing that they recognize them when they are happening to them. They were really struggling, and all I could think of was "I've been here! I know this!"

Which reminded me of this scene in The West Wing between Josh and Leo, who said:

This guy's walking down a street, when he falls in a hole. The walls are so steep, he can't get out. A doctor passes by, and the guy shouts up "Hey you! Can you help me out?" The doctor writes him a prescription, throws it down the hole and moves on. Then a priest comes along and the guy shouts up "Father, I'm down in this hole, can you help me out?" The priest writes out a prayer, throws it down in the hole and moves on. Then a friend walks by. "Hey Joe, it's me, can you help me out?" And the friend jumps in the hole! Our guy says "Are you stupid? Now we're both down here!" and the friend says, "Yeah, but I've been down here before, and I know the way out." As long as I got a job, you got a job, you understand me?

I told my friend, "Hey, I've been here for years, and I know my way around this hole. Trust me - I've got your back. It'll be OK."

And for the first time since I was kicked out, I felt that all that I had been through was worth it. Every horrible day - worth it. Because I could help my friend.

Amen

The Painfully Slow Updating of Mac OS X 10.10.3

Wednesday, April 8th, 2015

Yosemite

After updating my iPhone, I realized that I hadn't checked for updates to my laptop this afternoon, so I checked there, and sure enough - OS X 10.10.3 dropped as well. This is a 2.02 GB download and updates the Rescue Disk as well as several parts of Yosemite - including the new Photos app.

Now, I've been struggling with the Guest WiFi for a while, and to a point, I understand that there's a limit to the bandwidth they want to provide. But it's kinda silly to limit the bandwidth to what they have now given that you can get Comcast to deliver 50 Mbps to your home. It's kinda silly to cheap out on the network bandwidth.

So it's going to take me over two hours to download 10.10.3 to my personal laptop. It's OK... I've got time... it's just this kind of thing that makes it hard to convince people that this is a Software Company and not the traditional Service Company.

Until then, I wait and watch the download progress...

[3:28pm] UPDATE: finally finished, and then the 10.10 Command Line Tools needed to be updated as well. In the end, it was all done before I had to leave, and that's a win in my book.