maximize/minimize gets added to refined-github

If you use Github on a regular basis, you may have noticed how really large pull requests can quickly get out of hand. For this specific reason, I created a little (unpublished) Chrome plugin a while ago to add the ability to maximize/minimize diff blocks in the Github pull request file change page (see below).

Then the other day, I happened across the (published) Refined Github Chrome extension, which is a similar collection of modifications to Github in a Chrome, so I decided to ask them whether they’d like my feature added in. As it turns out, they did! So after an hour of actual coding and changing the jQuery-dependent code over to use the much lighter Sprint.js, the change finally got green-lighted. A little back and forth with some great suggestions and now the feature is officially added in.

Here is the feature in action:

Maximize/Minimize for Github Pull Requests

The only difference between when I made this gif and now is that the plugin features a zoom-in/zoom-out cursor when hovering over the block header box where you can individually min/max.

Next, I’ll make it so the same functionality works in other diff blocks.

domango

I felt like making a domain search tool for myself, so I did. I figured someone might get some use out of it as well.

Also, I really like the domain — domango.io (pronounced doe-mango).

It might seem slow at first, but it’s looking up a lot of information on each domain.

Update: I have shut Domango down as other priorities took place and, frankly, it was fun but there are far superior services available.

os x: set file self destruct based on tag

inspector_gadget

If there’s one thing I dislike, it’s clutter.

Once in a while, I like to do a purge of my downloaded files and things on my Desktop. What I kept finding, however, is that I was unsure about whether I needed certain files after even just a few weeks. This would lead to me putting them somewhere (hopefully) temporary labeled “delete_me” or something similar. Then, when I’d happen upon the folder later on, I still wasn’t quite sure about whether it was okay to delete the folder.

So I thought about using Finder’s Tags so I could label things that were OK to delete. It wasn’t much of a leap from there to see if I could use a cron script to delete the files for me after a time of my choosing, and sure enough — it worked!

Of course, I had to be my own guinea pig, because I didn’t want to risk deleting someone’s important files but knowing I back up my most important files, I wasn’t too worried.

Months later, I’m still using this process routinely, so I decided to put it online in case anyone out there has a similar need.

You can check it out here: OS X Self Destruct

No, I don’t mean OS X will self destruct. I just like the idea of a message that will destroy itself at a time of your choosing like on Inspector Gadget.

 

wait. diet and exercise actually work?

Back on July 16th of this year, my wife and I started a little bet to see who could lose the highest body fat percentage by the time we left for our trip to Vegas on August 13th. While she did end up winning by a hair, I learned something shocking that will carry me to my next goal: a healthy diet combined with a little daily exercise will cause you to lose weight and feel good doing it.

I know, I was shocked too. I mean, who knew?

So to get started, I didn’t want to do anything drastic like I’d done in the past (South Beach, Master Cleanse, etc.); this time, I wanted to go about it the right way. The healthy way without shortcuts. Well, almost without.

Earlier this year, I picked up a Fitbit to start tracking my daily steps and such, with the added bonus of having a few of my friends to compete with. I also purchased the Aria Scale to track my weight and body fat percentage. Probably overboard but I like the simplicity. In any case, it has kept me very aware of how active I am during the day and how I’m impacting my weight over time as opposed to just trying to recollect how things have changed.

There is something to be said for the ability to look at things objectively.

So I had my exercise tracking in place and I was making sure to aim for about 12,000 steps per day. The next thing to worry about was the diet, but I didn’t really need to think about it. The nice thing about having tried so many things to lose weight, I do understand what makes me gain weight and even more so now that I’ve treated it as a sort of experiment. What I did this time was start to limit my portion size to get used to eating less and I threw daily intake of carbohydrates and sugar out the window. That’s not to say that I did so completely; in fact, my aim with this change is to make it lifelong so I want to be able to eat stuff when I want to. That includes the bread at my favorite Indian joint, or cake at birthday parties, or a little bit of rice or frozen yogurt from Yogurtland. I just didn’t want to eat carbs every day, so that was it. Smaller portions and reduced carbs.

An example breakfast was a simple scramble of eggs over sautéed, thinly sliced mushrooms and sausage. Most days, lunch was Chipotle. My favorite dish is just a salad bowl with double chicken (2 ounces, I believe) and sometimes some of their vinaigrette over the top. Dinner would either be something chicken-based but equally un-carby, or something egg-based. Then, I’d just snack on roasted almonds or pistachios with a stick of string cheese in between.

You may recognize this general diet as part of the South Beach regimen and indeed that is where I borrowed a lot of this from. I just sort of adjusted it to exist without phases. Instead of phases, I just default to a standard life diet and eat whatever I want at other times. You get the idea.

So, I started this sort of thing back in mid-July and by the time the trip rolled around a month later, I had lost around fourteen (14) pounds. And it wasn’t water weight this time (stupid Master Cleanse). My biggest worry at that point was gaining all the weight back at the notorious Vegas buffets, along with the tradition of gorging oneself while in a different city (why is that a thing, anyway)?

And eat, I did! We ate at the Caesar Palace’s Bacchanal Buffet, which is pretty amazing in terms of what they offer. We also ate at various restaurants around town. All told, I gained about five pounds over four days. I’m sure in some colder climate that could have been a higher number, but it sounded about right for a vacation — a pound a day.

As you can see from this graph I pulled from Fitbit, the gain from the trip ended up being sort of a minor setback before I continued on.

2014-09-20 at 9.07 PM

The other thing you can see on this graph is the difference in my weight loss before and after the trip, and this is where the learning came in. My restricted diet and an average of 12,000 steps per day caused me to lose roughly .44 pounds or .2 kilograms per day.

However, once the trip was over, I stopped walking as much due to things like increased activity at work and taking the kids to soccer practice. I noticed the stark contrast. Today is 9/20 and in the 31 days since 8/20 I’ve gone from 198 to 194.8. In other words, .10 pounds or .045 kilograms per day.

Now, I’m not accounting for other things that happen due to stress and having a baby around, like lack of sleep and increased coffee consumption, but by and large I have stuck to the same diet, yet my daily step count has been stuck at around 5,000 on average (less than half of my pre-Vegas 12,000). That’s also not accounting for the steep hills I was walking with an increased heart rate.

So the takeaway here is that aiming for a daily step count of 12,000 combined with my current diet leads to a difference of an additional .34 pounds or .15 kilograms per day.

From the perspective of trying to reach my goal, I can do it in either twenty-three (23) days with the combination of diet and exercise or one hundred (100) days with just diet alone. There is nothing really wrong with either way but in terms of achieving goals, this one is far more reachable when I am taking an hour a day to go on a walk.

I won’t go into all the side benefits of these walks, but there are plenty. It’s just a matter of fitting it into my day, which probably means waking up a lot earlier. In either case, it does feel good to know that I will reach the goal eventually. Then I’ll have to worry about losing too much weight.

Oh what a problem to have.

xcode right key disabled

I just wanted to make a quick note for anyone else that might have this very strange behavior when messing around in XCode. I was messing with making an iOS app and found that I couldn’t use the right key while editing code; it would just beep at me.

After searching for a solution and finding nothing, I decided to look for the obvious — some unmapped key sequence and, as it turns out, I was right to look for it.

If you go to XCode’s preferences under XCode > Preferences. Then go to Key Bindings and do a search for “move right.”

xcode_right_key_disabled

Once you see the “Move Right (Selection)” command come up, click on the corresponding “Key” column and press the “right” key on your keyboard to set the mapping. Once that’s done, click elsewhere to exit the keymap text input. Close preferences, and that’s it.

I’ll admit, I’ve dealt with this for a few hours. Hopefully you won’t have to.