My Ting Test
Last month, I switched cellphone providers from T-Mobile to Ting. In looking at past reports, I had been paying T-Mobile around $63 per month (including taxes). This didn’t seem bad to me, but I thought I could do better. A couple of days ago, I got my first bill from Ting. The total is $39.81 (including taxes). I’m happy with this. The image below shows the breakdown of all the fees.
Not Casa Loma
My friend Ellen came to town for a vacation. Before coming, she had mentioned that she had a friend in Toronto that she wanted to see and I proposed a road trip to Toronto. I also suggested (strongly) that we take bikes and ride around while there, since this was my favorite activity when I was in New York.
Financial Independence
The past couple of weeks, I have been obsessing about becoming financially independent. When I was a kid, I would have thought of this as being rich. But now, all I want to do is be able to do what I want, without having to think about money. I’d like to have the option to do things for people or not, based on whether I think it’s interesting or not, taking money out of the equation entirely.
Poppyseed Dressing
There are few salads that I like. However, the poppyseed fruit and chicken salad at Portillo’s is one I love. I’ve tried poppyseed dressing at other places and have bought different brands. They just aren’t as good. I found a couple of recipes online that I’ve tried. The first one I tried used a grated shallot. I grated a pretty small one, but the result tasted way too much like onions, so that one didn’t work at all. This one though sounded better. Though since I had just had the failure with the shallot, I left the onion powder out of it. I also left out the lemon juice because I didn’t have any. The result though was great! So, since this is my repository of all things I want to save, here is the recipe I followed:
Capistrano 3 Issues
I decided to give capistrano 3 a try with one of my projects. For the most part, I prefer version 2 to version 3. Mainly this is because I never have a staging server. I only have my development stuff and then I deploy to production. So having to specify the deployment server is just additional work that I always forget.
Counting Comma-Separated Values in Excel
We have a bunch of spreadsheets where which have cells with values like this, R1, R2, R3, R4 or C45, C87, C22. It would be very helpful to have another column that could tell us how many values on in these cells (4 and 3 in my example). The way to do it is to use this function, which would tell us how many values are in cell H8.
Openssl Update Breaks Pine
There was an openssl update recently that caused people who were using alpine to not be able to send mail. When they tried to send, they got this message:
Vacation!
It’s rare, but every so often I take a real vacation. By this I mean, I take off at least a week from work, go someplace and just relax. In my case, that means riding my bike around and reading. This time, I spent just over a week in New York City. I went for the Five Boro Bike Tour and stayed to go to a friend’s reading of his play. During my trip, I ended up biking over 130 miles and read six books. I could have done more of both. It was one of the best vacations I’ve ever taken.
incompatible character encodings: UTF-8 and ASCII-8BIT) in Rails App
I got this error after I updated a website from rails3 to rails4. I spent a few days going over character sets and collations in MariaDB. It turns out that all I needed to do was to use the mysql2 gem instead of the mysql gem. I am writing this so I hopefully will remember when I do this again.
Ruby Lambdas
I’ve used ruby lambdas a few times, but I have to admit that I never really understood them. However, I’ve now come across a case where I have to figure them out. Here’s what I’ve found:
Authlogic Error
I put up a new website that wouldn’t allow me to login and kept giving me an error that said something like undefined method `save_without_session_maintenance’. I double-checked all my controllers and models against another site that was working fine and they all matched up. I didn’t find any bug reports for the version of Authlogic that I was using. The solution was to just deploy the app again. After that, I was able to login successfully. Weird.
Remote Desktop Services with a Samba PDC
We’ve been using a linux computer running samba and openldap as our primary domain controller for a windows domain for years. I absolutely love the fact that I don’t have to deal with windows and their crazy licensing. More importantly, this setup makes it easy for me to create accounts to give people access to everything in our shop. This includes windows accounts, linux accounts and website accounts.
Serving SVG Files
I updated a website and changed to using svg files for our header. On our test setup, we were running RHEL7, which had a newer version of httpd than what’ on our production server, which is running RHEL5. I had to add the following to our httpd.conf file to tell it to specifically serve svg files.
Sendmail on Centos 7.1
I’m running a server that I recently upgraded to Centos 7. For a few months, it wouldn’t send mail and today I finally decided to do something about it. I was getting an error AUTH warning: no mechanisms. After messing around for a while, I saw this in /etc/mail/access:
Make a Bootable USB Drive with Yosemite Installer
I wanted to completely reformat and reinstall Yosemite on an old iMac. To do this, I needed to make something I could boot from. I got an 8gb usb flash drive and used Disk Utility to reformat it to a Mac filesystem that I called Yosemite. This disk was then mounted at /Volumes/Yosemite. I then went to the App Store and downloaded Yosemite, but cancelled the installation. This left the installer in /Applications/Install OS X Yosemite.app. Then, to make the bootable drive, I ran the following command:
Back Issues
About a week and a half ago, I pulled a muscle in my back. I don’t know exactly what I did, but I do remember that I was putting on a sock. I don’t remember doing anything odd, but I do remember the sharp pain. I thought it might be something bad, but I proceeded through the day as usual. I had this same injury (though much worse) about 15 years ago, if not more. At that point, it hurt so badly that I had a hard time standing up. Now, I’m pretty much ok if I keep my back bent a little, but it hurts quite a bit when trying to straighten it. This leads to the odd situation where riding my bike feels really good, but going for a walk can be painful.
Biking
Went for a nice bike ride this morning because it’s lovely out. Decided to ride to the bank to deposit a check and then take a ride along the lakefront. Did about 13 miles and felt pretty good. I just noticed on my Cyclemeter app that it tells me how many miles I biked overall last year. It’s close but I know that I don’t always remember to turn it on and I only got the app in April. So it’s probably a bit low. Anyway it says I rode 1131 miles last year. So far this year, I’ve ridden 102 miles. That’s pretty good. I didn’t think that I already rode that much this year. I think I now have a goal for the year. I need to do more than 1131 miles.
Production Gems
I’m not sure how I didn’t notice this before, but my deployment on an app was suddenly taking much longer that it had in the past. While I was watching it run, I noticed that when bundle install was running, it was saying installing each gem. I don’t know why I didn’t notice this before. I looked on my server and noticed that each release was about 177mb in size and the vendor/bundle directory was 173mb in size. I was reading the Bundler website when I saw this bit:
Lots to Learn about Assets
I upgraded a new app to use Rails 4.2 and bootstrap and I thought things were fine. However, when I went to the page today, css wasn’t working. It just never created the css files. Turns out that I needed to add the ‘sprockets-rails’ gem to my Gemfile because the asset pipeline is no longer a feature of rails 4. Once I ran bundle and commit this change to the repo, I could deploy and things worked fine.
Still Learning About Rails and Deployment
I had been feeling pretty good about my Rails skills and had been able to create and deploy a number of simple applications. Since simple applications are just about all I’m going to write, I was ok with things. But I was hanging on to earlier versions of things and it was starting to bug me. One big one was the capistrano gem. I knew there were big changes between version 2 and 3, and I had a pretty good setup using version 2. However, I know that things constantly change so I decided to dive in and start using capistrano version 3, 3.4.0 to be exact.
A Splendid Torch
This is the true joy of life, the being used up for a purpose recognized by yourself as a mighty one; being a force of nature instead of a feverish, selfish little clod of ailments and grievances, complaining that the world will not devote itself to making you happy.
Spring is Coming
I don’t know if it’s because I’m getting older or if we had a particularly snowy winter, but I cannot wait for spring to come. Today makes me happy because spring training starts and I can watch a game on tv and see the outdoors not covered in snow. Something that makes me even happier is that today signups open for 30 Days of Biking. This is a group that asks people to pledge to ride their bike every day in April. That’s it. The idea is that if you ride every day at the start of biking season, you’ll be more inclined to think to use the bike for small errands and things during the rest of the summer. It’s brilliant in its simplicity. It doesn’t cost a thing. The idea is just to get you out biking. And as an added bonus, they’ll donate a bike to a kid in need for every 30 riders who sign up. I did it last year with my sister and a friend and it was fun. On the day that we spent 15 hours in the car on the way back from Boston, I did have to borrow my nephew’s bike at 10:30pm to ride to the corner, but I’m happy to say that I rode every day. And it’s a great reason to get together a group and go for a group ride. So I just pledged again this morning and am looking forward to it. I’ve already ridden a bit this winter, but spring riding is so much more fun. So if anyone else wants to pledge, I say go for it! And if you’re looking for someone to go for a ride with in April (or quite frankly anytime), let me know. I’m in!
Changing Rails Boolean with a Button
I suddenly realized how to change a boolean with a button in a much easier way that the post I did yesterday. All I did was make a form with one hidden field (the boolean that I want to change) and just show the submit button.
Change a Boolean in Rails with a Button
There’s a much easier way to do this, which I show in this post.
Rails Rewrite
I have a website that I’ve been using to track timesheets for a number of people. It’s one of the first websites I wrote in rails, written about four years ago. The only person who really uses it is me, but a few other people also login to view the information. Anyway, the site was written in rails 3.2.11 and now the latest version is 4.2. I’ve decided that since I know a bit more rails now (I wouldn’t say I’m a good programmer), I’d rewrite the program. It’s not that elaborate, but it does work really well for me.