How many times bigger is 4K?

Published by:

1080p versus 4K

4K televisions have 4 times as many pixels as 1080p televisions. Unless, of course, you are talking to TigerDirect’s marketing department. Their diagram of 4K is clearly more than 4 times the size of the 1080p (The diagram is also shown below.)  You always get more than you paid for with TigerDirect. (DISCLAIMER: My personal experiences with TigerDirect have all been normal.)

1080p versus 4K

The 4K box in this diagram is far more than 4 times the size of the 1080p box.

Blah.

Published by:

I thought I should post something. It has been so long. The only really new news is that my personal homepage is back up. That’s what I get for rm -rf *ing the wrong directory. Maybe one day it will be as great as its grandfather once was.

I also posted some old pics on flickr. Maybe someday I’ll take some new ones off a camera.

No, I don’t work here!

Published by:

It seems like every time I walk into a department or electronics store someone asks me if I work there. Well you know what, “No, I don’t!” In some stores this really can’t be avoided, but others just aren’t doing what it takes to distinguish their employees.

Does it look like I work here?

I’m not wearing a uniform!

How can people be so stupid sometimes? I’m not wearing a bright red shirt. I am wearing blasted jeans, and what’s my name? Oh yeah, I don’t have a nametag!

Maybe they just assume that the random pile of junk I have piled in my hands must mean that I am stocking shelves. Who knows?

Who works here?

On the other hand, a certain retailer just doesn’t do enough to distinguish their employees. Most of then are dressed in jeans and a t-shirt with only an ugly blue apron to distinguish them from the croud. I can’t ever seem to walk all the way through that store without being asked for help. Seriously Wal*mart, you treat your employees bad enough. At least save your customers the some hassle.

Fix it already

I have never been asked this in a Target, Staples, Office Max, Sears, or the local grocery chains and I frequent them far more oftenly. Yet every time I walk into one of your stores I can’t make it out without the inevitable, “Excuse me sir, could you help me.” You must be doing something wrong.

Website backup script (with e-mail)

Published by:

This is a sh shell script I wrote to backup my new website. It is attached to a cron daemon and backs up a MySQL database and directory daily. These tarballs are automatically saved on your server for a set number of days. As an added bonus, it emails you the archives every day. (Thank you 2GB+ gmail)

It should be pretty self explanatory. If you have any questions, feel free to ask.

The code

#!/bin/sh

## Script configuration    ##
## ** PLEASE EDIT THESE ** ##

# Site name
# (to distinguish from others)
SITE_NAME="Wombatorium"

# Working directory
# (save backups here)
BACKUP_DIR="/home/username/scripts/backup/"

# Database information
DB_HOST="localhost"
DB_USER="username"
DB_PASS="password"
DB_NAME="database"

# Directory to backup
FILE_DIR="/home/username"
FILE_BACKUP="public_html"

# Days to go before removing backups
# ex. "14 days ago"
# ex. "1 month ago"
DAYS_AGO="4 weeks ago"

# Address to email backups to
EMAIL_TO="yourname@gmail.com"
EMAIL_FROM="username@webhost.com"


## The script                        ##
## ** DO NOT EDIT PAST THIS POINT ** ##

## Dump MySQL database

mysqldump --host=$DB_HOST --password=$DB_PASS --user=$DB_USER --hex-blob -Q $DB_NAME > $BACKUP_DIR/$SITE_NAME-latest.sql

## Tar the site directory

cd $FILE_DIR
tar -cf $BACKUP_DIR/$SITE_NAME-latest.tar $FILE_BACKUP
rm -f $FILE_BACKUP/log/*

## Bzip2 them up

cd $BACKUP_DIR
bzip2 -f $SITE_NAME-latest.tar
bzip2 -f $SITE_NAME-latest.sql

## Copy to archives

cp $SITE_NAME-latest.sql.bz2 $SITE_NAME-`date -d "today" +%Y_%m_%d`.sql.bz2
cp $SITE_NAME-latest.tar.bz2 $SITE_NAME-`date -d "today" +%Y_%m_%d`.tar.bz2

## Remove old files

rm $SITE_NAME-`date -d "$DAYS_AGO" +%Y_%m_%d`.sql.bz2
rm $SITE_NAME-`date -d "$DAYS_AGO" +%Y_%m_%d`.sql.bz2

## Email them out

TODAYDATE=`date -d "today" +%Y_%m_%d`

(
cat <<!
From: Backup Service <$EMAIL_FROM>
Subject: BACKUP: $SITE_NAME (`date -d "today" +"%m %d %Y"`)
To: $EMAIL_TO
!

cat <<!
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="DMW.Boundary.605592468"

This is a Mime message, which your mail program may not understand.
Parts
of the message will appear as text. If the remainder appears as random
characters in the message body, instead of as attachments, then you'll
have to extract these parts and decode them manually.

--DMW.Boundary.605592468
Content-Type: text/plain; name="message.txt"; charset=US-ASCII
Content-Disposition: inline; filename="message.txt"
Content-Transfer-Encoding: 7bit

!

echo "$SITE_NAME Backup for `date +"%a, %B %e %Y %T"`"
echo "MySQL Database: $DB_NAME"
echo "Directory: $FILE_DIR/$FILE_BACKUP"
echo ""
echo "----"
echo "Automated e-mail blog backup service"
echo "See http://www.wombatorium.com for details"

BASE=`basename $SITE_NAME-$TODAYDATE.sql.bz2`

echo --DMW.Boundary.605592468
echo Content-Type: application/octet-stream; name="$BASE"
echo Content-Disposition: attachment; filename="$BASE"
echo Content-Transfer-Encoding: base64
echo

perl -e '
use MIME::Base64 qw(encode_base64);
local($/) = undef;
print encode_base64(<STDIN>);' < $SITE_NAME-latest.sql.bz2

BASE=`basename $SITE_NAME-$TODAYDATE.tar.bz2`

echo --DMW.Boundary.605592468
echo Content-Type: application/octet-stream; name="$BASE"
echo Content-Disposition: attachment; filename="$BASE"
echo Content-Transfer-Encoding: base64
echo

perl -e '
use MIME::Base64 qw(encode_base64);
local($/) = undef;
print encode_base64(<STDIN>);' < $SITE_NAME-latest.tar.bz2

echo --DMW.Boundary.605592468--

) | /usr/sbin/sendmail -t

Waht are you tklanig aobut?

Published by:

Aoccdrnig to a rscheearch at an Elingsh uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht frist and lsat ltteer is at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae we do not raed ervey lteter by itslef but the wrod as a wlohe.