A better CSS reset stylesheet

A better CSS reset stylesheet

If you aren’t a web developer then you may not know this, but browsers are a mess. Every browser picks and chooses how it wants to render the same HTML. For examples, some browsers don’t have any default margin on the body. Some do, but with varying amounts of margin. Internet Explorer is of course the worst offender, and there are many versions of Internet Explorer still widely used.

To get around these issues, web developers typically use what is commonly called a reset stylesheet. This CSS file resets all of the default styles for all the possible HTML elements, so that you have a blank slate to start with. They’re a bit of a pain to use because they require the web developer to then define what they want the styles to be for everything. For example, they typically wipe out padding and margins on all elements, so you have to set padding and margins on all elements if you don’t want them squished together.

Fortunately some smart people created something even better than a reset stylesheet: normalize.css. Instead of resetting all the default styles, normalize.css selectively sets reasonable styles only for the elements that need it. It keeps all the default styles that are already in use by the majority of browsers. You can get it for free here.

Read More

Flashlights for a 72 hour kit

Flashlights for a 72 hour kit

Flashlights are a basic item in any 72 hour kit. In an emergency you are going to need light: to set up a tent, to walk a trail, to find your stuff in a shelter, to read a map at night, etc etc. After doing a fair amount of research, I feel a kit needs three flashlights: a lightweight handheld battery powered flashlight, a battery powered headlight, and a crank or magnetic induction flashlight.

Lightweight handheld battery powered flashlight

I made the decision to power all my electronics with Energizer Ultra Lithium AA batteries. Using AA batteries really narrows which flashlights you can get. Big flashlights with D batteries are way too big and heavy for an emergency kit. Small flashlights with AAA batteries would require carrying AAA batteries and AA batteries. My solution was to buy whatever cheap flashlight I could find at Walmart that took AA batteries. For me it was a Black & Decker Cliplight. It is about 6 inches long, takes two AA batteries, and is reasonably bright at night. I plan on keeping two Ultra Lithium batteries in it, and packing two spare batteries in my bag.

Battery powered headlight

A headlight makes it easy to see while setting up a tent in the dark. It can also be handy if you are carrying a toddler while walking on a dark path. My choice of AA batteries again limited my options here. I ended up getting the Rayovac SE1WHLT-B Sportsman Xtreme on Amazon. It takes a single AA battery and claims to provide 45 lumens. It also has red LEDs so you can get a little light without ruining your night vision, and a low-power blue LED that allegedly makes it easy to see blood in the dark (designed for hunters), but I’ll probably just use it to save battery power.

The downside to this headlight is that it won’t last long on a single battery. With the main light, it will probably only last around 3 hours. Because of this I’ll be packing two spare batteries.

headlight

Crank or magnetic induction flashlight

It is vital to have light even if the batteries die and you run out of spares. This means you need something you can power on your own. The typical options for this are hand crank lights or magnetic induction lights (the kind you shake). I personally hate the shake lights, and my radio of choice comes with a crank and a flashlight, so I think I’m set.

Disposable flashlights

If I end up with a little extra room in my pack then I’ll probably pack several flashlights that I consider disposable. These are cheap (or more often free) LED flashlights from Harbor Freight. I consider them disposable because they tend to take button cells (like the common CR2032) and I’m committed to carrying only a single type of battery. The flashlights themselves are so inexpensive that it wouldn’t bother me to lose one (or two or three), trade them away, or to just toss them when the batteries die. If I end up putting these in my packs then I’ll probably use them up before draining the batteries on my primary lights.

Read More

Use an old cell phone as a baby monitor

Use an old cell phone as a baby monitor

When my first child was on her way I bought a fancy baby monitor. It had pan, tilt, zoom, night vision, a temperature sensor, etc etc. It did everything. It had two huge problems though: it severely degraded my wifi whenever it was on and the battery in the monitor went bad before the second baby arrived. Lame.

For my second child I switched to using an old Android. It doesn’t pan or tilt. It doesn’t have night vision. But it works, it is free, and it uses junk I already had laying around.

On the old Android I use IP Webcam. It is a free app that streams your phone’s video/audio.

On my current phone I use VLC for Android beta. It is also free, and lets me stream the audio from IP Webcam (which is all I want at night anyway). I leave it going all night so I can hear my son in case he gets up. It also makes it easy to go out and do yard work without worrying about him waking up without anyone inside to hear him.

To stream the audio on VLC, use the IP from your IP Webcam phone and add audio.wav to the end, like this: http://192.168.1.133:8080/audio.wav

2015-01-12 19.52.42

During the day, when I’m in my home office working, I can use my browser to watch/listen to him when he is down for a nap. Again, I can’t pan or tilt, but all I really care about is whether he is awake or asleep. I don’t really need pan/tilt for that.

Read More

Debugging bash scripts

Debugging bash scripts

I use a lot of bash scripts to automate my server tasks. They are quick and easy to write, and work across multiple distributions with little to no modification.

Debugging bash scripts is easy. If your bash script is named awesome_script, then you would do something like this:

bash -x awesome_script

In addition to running the script, it will output every command the script runs along with the result of that command. No modifications to your script are needed.

Read More

Save money at Amazon with camelcamelcamel

Save money at Amazon with camelcamelcamel

If you like to shop at Amazon, you really should be using camelcamelcamel. This service tracks prices at Amazon and allows you to set alerts to tell you when prices drop on items you want to buy.

Here is a real world example: My wife and I wanted to buy some dishes that, at $76.48 per place setting, are quite a bit more than we are used to paying for dishes. We set a price alert and sat back to wait for the price to fall. Fast forward a month or so, and I got an email letting me know that the price dropped to $58.62, a savings of over $18 (counting taxes) per place setting. It took almost no effort on my part, just a few moments to copy and paste a URL to camelcamelcamel.

They even have a handy Chrome extension called the Camelizer. It adds a button to all Amazon pages that, when clicked, shows you price history and lets you set a price alert.

This works for pretty much anything that you know you want to buy, but don’t really need immediately. I’ve successfully used it to save money on new smoke detectors (the old ones still worked, they were just close to the expiration date), several books, a mattress for my daughter, a NAS, and more.

They also have a version for Best Buy. I don’t shop there so can’t really vouch for it, but looks like it works the same as the Amazon version.

Featured image is a creative commons licensed flickr photo shared by Ted.

Read More

LEGO DUPLO QUATRO

LEGO DUPLO QUATRO

I spent hours and days and weeks playing with LEGO bricks as a kid. I had a huge bucket of LEGO with a handful of DUPLO mingled in.

At a yard sale a few years ago we found a bucket of QUATRO, a lesser known variety of LEGO bricks that were only produced for a couple years. I wasn’t excited about the purchase, but Becca talked me into it. I am so glad she did. They are awesome for young kids!

lego-comparison

The coolest thing about LEGO, DUPLO, and QUATRO bricks is that they all work together. LEGO stacks on DUPLO, which stacks on QUATRO, which stacks on DUPLO, which stacks on LEGO. I thought this was common knowledge, but have recently discovered that many people are completely unaware of this wonderful design decision.

lego-duplo-quatro

This makes it possible to create some really cool things. For example, you can use QUATRO to build huge walls, then stack some DUPLO and LEGO on top to provide a place for your minifigures. Inside the walls, perhaps you could use some DUPLO bricks to make animals and trees. Maybe you have a small castle or house made of LEGO with a big DUPLO baseplate as a foundation.

I avoid non-LEGO brands. LEGO is the only brick system I’ve found with a consistently high quality, attention to detail, and guaranteed compatibility. If you really must choose a non-LEGO brand, go for a Mega Bloks Probuilder set. The Probuilder quality tends to be more consistent than the competition.

Read More