Peter's Useful Craphttp://www.theblog.ca
Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and moreMon, 11 Mar 2019 04:35:48 +0000en-UShourly1http://wordpress.org/?v=4.0theblogcahttps://feedburner.google.comRecycling flexible plastics in BC: take them to London Drugshttp://www.theblog.ca/recycling-flexible-plastics-bc-london-drugs
http://www.theblog.ca/recycling-flexible-plastics-bc-london-drugs#commentsMon, 11 Mar 2019 04:35:48 +0000http://www.theblog.ca/?p=949If you’re a Metro Vancouver resident, chances are that you bring your own re-usable shopping bags to the store. You might even bring your own re-usable produce bags. Then at home, between the compost, paper recycling, container and hard plastic recycling, and plastic bag recycling (back at the grocery store), what remains in your garbage can is mostly other plastics (and, especially during allergy season, tissues).

Now there’s a place for all that other plastic. In our house, that other plastic includes frozen fruit packaging, baby food stand-up pouches, crinkly snack bags such as chips, granola bar wrappers, bubble wrap envelopes, and much more.

London Drugs now accepts what they call flexible plastic packaging. That’s of course in addition to all the other things they accept such as Brita filters and batteries. In its blog post about the flexible plastic packaging program, it mentions all of the examples of packaging they accept. I find the flexible plastic packaging versus soft plastic packaging distinction a bit confusing, but there are a lot of items in the list, and in the comments section, they do their best to answer consumer questions.

The post also states that the collected plastics will be used for recycling research and development. In other words, the material won’t necessarily be recycled yet. For now, at least it’s being kept out of the dump with the long-term goal of recycling more of it.

]]>http://www.theblog.ca/recycling-flexible-plastics-bc-london-drugs/feed0TubShroom review: yes, it prevents my bathtub drain from clogginghttp://www.theblog.ca/tubshroom-review-yes-it-prevents-my-bathtub-drain-from-clogging
http://www.theblog.ca/tubshroom-review-yes-it-prevents-my-bathtub-drain-from-clogging#commentsFri, 08 Mar 2019 05:47:20 +0000http://www.theblog.ca/?p=947There is a never-ending and annoying supply of gadgets and widgets that solve every household problem, whether you knew you had the problem or not. The TubShroom is one of them. But it works, at least for me.

I was tired of my bathtub drain clogging what seemed like every couple of months. The shower started to pool fast, the water drained slowly, and I got a lovely soap scum ring in the tub. Sometimes the plunger did the trick, sometimes the drain snake / auger, and sometimes the dreaded Drano. Often they’d only work partially. Naturally I wondered whether there were issues with the pipes.

Thankfully, the success of the $15 (CAD) TubShroom proved that it was essentially just long hair from my family members, along with shampoo and soap bunching up. This is what the TubShroom looks like after about a week in the tub:

(Sorry, it’s a bit gross, but if it didn’t look so gross that would show that it doesn’t work.)

I’m sure that it does not catch “every single hair, every single time” as it claims, but it catches tons of long hairs that would have otherwise caused a backup further down in the pipes. The TubShroom essentially causes a mini-backup every week or two, but it’s so straightforward to remove all the gunk, and I would much rather do that then have a major backup that I cannot see or access.

Yes, a mesh strainer tries to do something similar, but when we had one, it never seemed to catch as much, nor was it as simple to clear out.

I can confirm that the TubShroom is easy to install. It’s flexible yet sturdy enough since it’s made of silicone. It fits right in to where my normal tub stopper is. Just make sure that you have a standard 1.5-inch drain. I cannot guarantee that it will work for you, but I can say that the TubShroom works very well for me and I can recommend it.

]]>http://www.theblog.ca/tubshroom-review-yes-it-prevents-my-bathtub-drain-from-clogging/feed0How to install a Samsung 960 Evo in a ThinkPad T470http://www.theblog.ca/how-to-install-samsung-960-evo-thinkpad-t470
http://www.theblog.ca/how-to-install-samsung-960-evo-thinkpad-t470#commentsMon, 16 Oct 2017 05:22:06 +0000http://www.theblog.ca/?p=926I recently installed a Samsung 960 Evo SSD hard drive in ThinkPad T470 laptop (after having already purchased and received the laptop with a standard hard drive in it), and it was much more difficult than expected.

Put the Samsung 960 Evo drive in the bracket above, attached to the motherboard via the cable above in the main hard drive slot in the machine

Put the existing hard drive (that came with the ThinkPad T470) in a standard SATA USB enclosure, but don’t boot from it

Put Clonezilla on a bootable USB stick, and boot from Clonezilla, so that I could copy the old hard drive to the new SSD

Even though this was technically still cheaper than just buying the ThinkPad T470 from Lenovo with an SSD in the laptop in the first place, it took weeks to get the correct parts, and I certainly wish I’d paid the extra money up front.

To help provide context for the above, this is what didn’t work:

Putting the Samsung 960 Evo SSD directly in the ThinkPad T470 without having to purchase additional parts. There is an M.2 slot in the machine, but the physical space available to put something in that slot is way too small to put the 960 Evo. Had I purchased the ThinkPad with an SSD already in it, the necessary slot would have been available in the standard hard drive area.

Putting the Samsung 960 Evo SSD in a third-party external hard drive USB enclosure. As per the point above, the “M key” connection on the 960 Evo makes it unsuitable for a standard SATA USB enclosure. There might be such an external enclosure that supports the “M key” connection out there, and hopefully this becomes more common over time.

Booting Windows from the existing hard drive (that came with the ThinkPad T470) from a USB enclosure. The goal was to use Samsung’s Data Migration software to copy the existing drive and operating system to the new SSD.

Clearly I had and still have a lot to learn about SSDs!

]]>http://www.theblog.ca/how-to-install-samsung-960-evo-thinkpad-t470/feed1Airbnb for Business review: simple business trip accommodationshttp://www.theblog.ca/airbnb-for-business-review-simple-business-trip-accommodations
http://www.theblog.ca/airbnb-for-business-review-simple-business-trip-accommodations#commentsFri, 01 Jul 2016 03:50:47 +0000http://www.theblog.ca/?p=902Airbnb has become a very useful option for business travel. It can be cheaper than a hotel, but you can also often get a more convenient location and better amenities such as a kitchen. You also have many more options in case you want a place with multiple rooms.

Airbnb for Business has made normal Airbnb much more convenient for my small business. Just like Uber for Business, you can have multiple sub-accounts that can all charge trips to the main account and credit card. This way, employees can choose their own accommodations and book their own trips! Before I started using Airbnb for Business, I’d have to play middle man and make a booking on behalf of my employees; this took up my time and I’m sure the hosts would have preferred dealing directly with the person who would be staying at their place.

Once an employee is added to an Airbnb for Business account, they have an option to specify on a booking that they’re on a business trip:

This then allows them to select the option of charging the trip to the company credit card. This way, they don’t have to use their own card and wait to get reimbursed. They also don’t have to have the company credit card in their possession.

If an employee already has an Airbnb account, they don’t have to create another account for business purposes. They can simply add their work e-mail to their existing Airbnb profile:

From an administrative standpoint, I can see all trips made by my employees in the Airbnb for Business dashboard. This centralizes the information I need to do accounting.

I can of course add and remove employees under the business account. I can also add “bookers” who can book on behalf of other employees, and “managers” who can view the report information.

I can also manage the credit cards on the business account and assign different cards to different groups if needed.

Lastly, there are e-mail notification settings. I can choose to receive an e-mail for every booking, and I can also get special alerts if the nightly rate exceeds a particular threshold.

I highly recommend Airbnb for Business. While the basic Airbnb service has its own merits, I appreciate how it is providing tools for my small business that traditional hotels could have provided long time ago!

(And no, they did not pay me to write such a positive review!)

]]>http://www.theblog.ca/airbnb-for-business-review-simple-business-trip-accommodations/feed0Scrub Daddy review: durability is the deal breakerhttp://www.theblog.ca/scrub-daddy-review
http://www.theblog.ca/scrub-daddy-review#commentsMon, 30 May 2016 02:30:34 +0000http://www.theblog.ca/?p=899I decided to try the Scrub Daddy kitchen scrubber, which became famous mostly through Shark Tank. It cost $6 at Bed, Bath, and Beyond — it’s cheaper in bulk packs, but still at least 2-3 times the cost of normal kitchen scrubbers.

The Scrub Daddy is very good at scrubbing, and should not scratch most materials. Things don’t generally stick to it, so it’s easy to get the Scrub Daddy itself clean as well. However, I have 2 main problems with the Scrub Daddy:

1. It does not last long. After 2 weeks of normal, daily use on kitchen dishes, it started to fall apart. This is in contrast to a standard kitchen scrubber, which lasts for at least 1 month before I consider replacing it.

Once the Scrub Daddy starts disintegrating, little yellow pieces of the scrubber come off pretty much every time you touch it. While this deterioration happens to normal kitchen scrubbers and sponges, the rate at which the Scrub Daddy falls apart is significantly faster than any other scrubber I have used.

2. It does not hold soap well. This is probably a side effect of the Scrub Daddy’s scrubbing effectiveness, but if you’re used to putting soap onto your scrubber, you will probably find that you end up using much more soap with the Scrub Daddy.

When I Tweeted about Scrub Daddy’s durability issues, I got a quick reply from them, suggesting that I contact their customer service. Customer service over e-mail was very friendly and prompt. Basically, they asked for more information about how I used and cared for the scrubber. My use was nothing out of the ordinary, and the care instructions for the Scrub Daddy are no different than any other scrubber. They kindly sent me another Scrub Daddy, suggesting that I should get better results than with the first one. However, I found the same disappointing durability as before. When I searched online for other reviews of the product, I found that most people have a similar experience. I was impressed by Scrub Daddy’s customer service, although customer service is not something you expect to need for a kitchen scrubber.

In short, the Scrub Daddy is smiley, good at scrubbing, and a great success in marketing, but I cannot recommend it over a standard kitchen sponge. You could keep it on hand as a special-use scrubber for a small percentage of your dishes, but that seems like a lot of trouble, not to mention the cost!

]]>http://www.theblog.ca/scrub-daddy-review/feed4Nest Cam as a baby monitor review: expensive but lots of featureshttp://www.theblog.ca/nest-cam-baby-monitor-review
http://www.theblog.ca/nest-cam-baby-monitor-review#commentsSat, 16 Apr 2016 18:38:14 +0000http://www.theblog.ca/?p=894The Nest Cam is a souped up webcam that is marketed primarily as a security camera. It also works well as a baby monitor, which is what this review will focus on. Is the Nest Cam worth the $250 CAD (+ $100 per year for video history) cost?

Main features: video and audio

Video and audio quality with the Nest Cam is good. You can choose between 360p, 720p, and 1080p. The higher the quality the more bandwidth it uses, of course. For my purposes, even at 360p there is sufficient detail to see what a baby is doing, although I have it normally set to 720p. The camera captures a wide angle, and has good zoom capabilities. Night vision is a key feature — I use the camera exclusively at night — and works well.

The only challenge with the night vision feature is that the lighting and thus the clarity get messed up if there is an object between the camera and what you’re trying to watch, even if that object is off to the side. Thus, you have to make sure there’s a clear path to what you’re watching, or configure the camera to zoom past the other object.

Access to the Nest Cam’s video is through its website or a smartphone app. This is very convenient because you don’t need additional devices if you already have a smartphone, and multiple people can access the video through their own devices. Using either the website or the app, you can see the video and hear the audio, but also speak through the camera.

Setup

Setting up the Nest Cam is really easy. It comes with a 10-foot cable that you plug into the wall. Using the app, you scan the QR code on the back of the camera, name the camera, and enter your WiFi details. That’s it!

The Nest Cam is only 4.5 tall, and can either stand on its own or be mounted.

It’s quite portable — if you need to use it somewhere else in the house, you just move it and plug it in, and it automatically connects to the network again. If you need to connect it to a different network, then you just follow the same simple setup steps.

Supporting features: history and notifications

The Nest Cam has nice history and notification features, although after 30 days you have to pay for the history feature (which starts at $100 per year for 10 days of rolling video history retention).

The video history is summarized with a list of sound and motion notifications through the app or website.

When you’re logged in through the website you can also view the entire history, clicking through the hours and days of video just like any online video.

The notifications can be quite useful, with or without the video history feature. You can configure sound and/or motion notifications that will alert you via e-mail or through an app notification:

Other options that can be configured include video quality, a talk and listen chime, a status light, and more:

Although the general status light can be turned off, there is a specific case where a light shows even with that setting “Off”. When the camera has a temporary Internet connection issue, its blue light pulses, which could disturb a sleeping baby.

Plugged in and WiFi

The Nest Cam needs to be plugged in all the time, and does not have a battery backup. If you have frequent power outages, then this camera is probably not for you.

The Nest Cam also requires a good WiFi connection. This can be an issue if it needs to be placed in a room that does not have a good wireless signal from your router. It is also susceptible to any general issues you have with your Internet connection. Also, if you’re travelling with it and need to connect to a network with a login screen in addition to the WiFi password, you must use something like Connectify so that you can log in via another computer and then have the camera connect through that computer.

Bandwidth could be an issue, depending on your Internet connection. If you have the video history feature, it will be constantly streaming its video; otherwise bandwidth is only used when you’re watching the video. I measured 1 week of use (with video history) at 360p, and it used 5.05GB. Nest claims that at 720p with video history, the total bandwidth usage of your camera when it is on 24/7 is 60GB to 160GB per month. If you’re using it as a baby monitor, you probably won’t have it on all the time, though. In addition to the total bandwidth usage, you’ll need to consider its speed requirements in terms of amount of data per second. At 720p, this can be between 200Kbps and 500Kbps. You can consult the Nest website for the data speed requirements at the various video quality levels.

Conclusion

If the Nest Cam’s rich set of features are of use to you, and you have a good and reliable Internet connection and power, it might be worth the cost as a baby monitor. It might also have some good resale value. Otherwise you could stick to something cheaper and more basic.

]]>http://www.theblog.ca/nest-cam-baby-monitor-review/feed0Converting PHP cURL SSL / TLS cipher nameshttp://www.theblog.ca/converting-php-curl-ssl-tls-cipher-names
http://www.theblog.ca/converting-php-curl-ssl-tls-cipher-names#commentsSat, 09 Apr 2016 18:06:00 +0000http://www.theblog.ca/?p=893Web developers have started to pay more attention to secure connections due to vulnerabilities such as POODLE and the general push for HTTPS everywhere.

Some aspects of SSL / TLS are quite complex and generally not well documented for the level that most web developers work at. The issue of ciphers is one of the challenges. There is a long list of possible ciphers, and you might find yourself maintaining a limited list of ciphers that your application supports. One of the problems is that the cipher names are not the same across technologies.

If you are making PHP cURL calls, you can limit the supported ciphers using the CURLOPT_SSL_CIPHER_LIST option. However, if you want to support the cipher TLS_RSA_WITH_AES_256_CBC_SHA for example, you cannot pass PHP (or cURL directly) that identifier — it will complain that no such cipher exists. If you inspect the results of the function openssl_get_cipher_methods, you will find identifiers such as rsa_aes_256_sha, which happens to map to TLS_RSA_WITH_AES_256_CBC_SHA.

In order to find cURL’s mapping of cipher names, you have to inspect its source code! There, you will find the complete mapping, with entries such as this:

(Bonus tip: you can use cURL on the command line for quicker testing: curl -I https://site.com –ciphers “rsa_aes_256_sha”)

Lastly, it is important to note whether your server is using mod_ssl or mod_nss. If you want to support multiple ciphers, the PHP documentation says to separate them with colons. However, it does not state that with mod_nss the separator is a comma!

]]>http://www.theblog.ca/converting-php-curl-ssl-tls-cipher-names/feed0Park’N Fly Vancouver airport (YVR) parking reviewhttp://www.theblog.ca/parkn-fly-yvr-parking-review
http://www.theblog.ca/parkn-fly-yvr-parking-review#commentsThu, 31 Mar 2016 03:04:56 +0000http://www.theblog.ca/?p=889I was recently travelling out of Vancouver with a baby and a car seat and figured that parking at the airport would be relatively convenient and cheap. The main long-term parking options appeared to be jetSet and Park’N Fly, and I decided to try out Park’N Fly based on a recommendation.

I was impressed at how straightforward and convenient Park’N Fly is. It’s on Miller Road about 5 minutes away from the terminal. When you drop off your car, you just park next to the lot’s “lobby” and leave your keys in the car. You go in and register, then take a shuttle that runs about every 15 minutes to the terminals. Someone at Park’N Fly parks your car somewhere in the lot. There is an Air Canada check-in counter at the parking lot if you need it.

I didn’t end up taking all the bags and passengers on the shuttle — I dropped them off at the airport first — although it seemed like there would have been plenty of room to do so.

You can get a cheaper price than the walk-up price at Park’N Fly if you pre-book online, and also if you have one of various memberships, such as BCAA or BCTF. You can also earn Aeroplan points.

When I registered the car at check-in, I was sent a text message from Park’N Fly. When I returned back to YVR, I replied to the text message once I’d landed, which presumably triggered someone at the lot to get my car.

After taking the shuttle from just outside the terminal back to the Park’N Fly lot, I paid at a self-serve kiosk and picked up my car, which was waiting once again just outside the lobby.

Since the lot is a few minutes away from the terminals and you might have to wait for the shuttle (I got lucky as it was already there both times) you should probably plan up to an additional 30 minutes to the start and end of your trip. However, I found Park’N Fly about as convenient as it could have been given the circumstances!

]]>http://www.theblog.ca/parkn-fly-yvr-parking-review/feed0Ikea Skarsta standing desk review: cheaper, reliable Bekant alternativehttp://www.theblog.ca/ikea-skarsta-standing-desk-review
http://www.theblog.ca/ikea-skarsta-standing-desk-review#commentsFri, 26 Feb 2016 05:00:57 +0000http://www.theblog.ca/?p=888In my search for a standing desk, I found the Ikea Bekant sit/stand desk in the showroom. It looks great, has a large desk surface, and has a motorized up/down mechanism.

Thus, you can move it to the exact height you want whether you’re sitting or standing by simply pressing on a button.

I almost bought the desk until I found multiple reviews complaining about motor failures in the raising / lowering mechanism. While Ikea would presumably replace parts in the event of a problem, I didn’t want to have to disassemble the desk and bring it back to the store.

After much searching, I found and purchased the Skarsta desk, which is essentially the Bekant but with a hand crank to raise or lower the desk. No power or motor required. The Skarsta costs $300 instead of $600 for the Bekant. Ikea does not currently feature the Skarsta in the showroom (presumably in order to push people towards the more expensive Bekant that is a much more impressive demo), and it only comes in white.

The Skarsta is simple and effective. I recommend it if you are looking for an affordable and decent standing desk. The hand crank is quite noisy and takes about 1 minute to adjust the height between sitting and standing, and the desk will wobble a bit while it’s being adjusted. You can be very precise about choosing the final height. I read some concerns about its 110 pound load capacity, although I think that most people don’t place even close to that much weight on their desk. In general I have no real issues with the desk and am quite pleased with it.

I recommend getting a cable tray to attach underneath the desk to keep cables organized, especially for when you are moving the desk between a sitting and standing position. Ikea has a tray called the Signum, which fits well underneath the Skarsta.

Arguably, standing is no better than sitting if you’re remaining in the same position for many hours at a time. So, no matter what desk you have, take breaks away from the desk! You might also wish to buy a tall chair and a floor mat to make your workspace more comfortable.

]]>http://www.theblog.ca/ikea-skarsta-standing-desk-review/feed2Regular expression to extract cookie value from Apache access logshttp://www.theblog.ca/regex-extract-cookie-value-from-apache-access-logs
http://www.theblog.ca/regex-extract-cookie-value-from-apache-access-logs#commentsFri, 22 Jan 2016 02:51:50 +0000http://www.theblog.ca/?p=883I was recently troubleshooting a problem where I needed to extract cookie values and IP addresses from Apache access logs. In short, cookies were being shared across sessions instead of being unique to each session. The Apache log entries looked something like this:

The sed regular expression wasn’t stopping the match at the semi-colon or quote, however. Instead of using (.*) in the capture for any character, I had to use [^;"] for “not semi-colon or quote” even though the match on the same characters happens outside of the parentheses: