I just had to update my JS toolchain of node on up. NPM is insane. Not just the tool, but the packages.

CSS Animations using Transitions with Conditional CSS, Stacked Rectangles

This is a somewhat elaborate example of how to use conditional CSS and transitions to create a fluid, responsive stack of rectangles that are polite enough to stack up when the screen is narrow. The idea is I'm working on is to have a menuing system that stacks when the screen shrinks.

CSS Animations via Transitions

I don't know anything about CSS Transitions, so I made this little demo to try it out. It's ultra-simple, and I normally wouldn't post this kind of thing, but the examples I saw were a lot snazzier, so it was harder to read the code. (To this end, this is probably too fancy.)

CSS Animations via Styles (similar to jQuery animations)

This article is a little obsolete, because the latest way to do animations is via CSS Transitions but browser support isn't all there yet. This explores how to do CSS-style based animations, where the animations are controlled via Javascript code that adds and deletes class names from the className property.

Cloud Storage Reviews Dropbox, OneDrive, Google Drive, iCloud

If you want to read some professionally written reviews, I read these:
PC Advisor
PC Mag
My review will be a lot shorter: Dropbox. Explanations below.

Sending an Email When an Event Happens (Windows Server and Powershell)

So... we got these servers a couple years ago, and the event logs don't email me things anymore. It was one of those things that I forgot to check because it's something you just don't check, but it's important. I ended up seeing the alerts late. No harm - no foul, but it still sucks.

The problem is, the latest Windows servers don't have a built-in feature to email events from the event log. The fix is to run a PowerScript script to send the message.

Netgear GS105PE VLAN Configuration Notes

The docs are kind of sparse on this, and they really push the simpler "port based vlans". That's not what you want. You want the advanced 802.1Q setup, which is the type of VLAN used on most managed switches.

Script to Turn IP Camera Uploaded Images into Videos (Unix)

This script combines individual photos into a video, and adds a timestamp to each frame. It's a poor mans security camera video maker.

I Think I Got Scammed - My Battery Desulfator Experience

I just bought one of those "battery desulfator" devices on ebay. The brand was, but there are numerous different brands, and there are some that are added to battery chargers. This essay explains why I got bamboozled.

A funny RAID 1 failure factoid: you will fail more

A funny thing about RAID 1 disk mirroring, is that if you implement it on your computer, you're more likely to experience a failure. The trade off is that the failure won't be catastrophic.

Setting up the HP P1102w with Linux Ubuntu Gnome

The printer stopped working, so I had to look for instructions. Things have changed a lot since I got this printer. Originally, it required the proprietary HP drivers and utilities, because CUPS didn't have any support. It worked, but was a bit of a pain, and required running a program on the workstation, creating an hplip printer, and printing through that. It worked... but then the drivers stopped working. (Since I print so infrequently, I don't know when they stopped working.)

Django, forcing a specific migration

Migrations are awesome magic, until the magic fails. Then it's an awesomely frightening engine of change that threatens to wipe out your entire database.

So, before doing what I say, backup your database.

I had to enforce a "unique=True" constraint on a model. Migrations are supposed to automatically create a constraint in SQL, as well as its implied index. A quick look at the indexes (SHOW INDEXES FROM Model) didn't show the index.

Battle of the Naming Conventions (how to avoid them in Django REST Framework)

Python and Django like snake_case.

AngularJS feels like Java, and likes camelCase.

HTML likes dashed-words.

MySQL docs like snake_case, but I see more PascalCase used in databases. It's case-sensitive, too. uses PascalCase for tables/classes, and camelCase for columns/properties/fields. That's like Java OOP.

Django likes to append _id to your primary keys.

So... the problems start to happen when one piece of named data is passed from one layer of the system to another. It's just a good policy to use the same names at all layers, if possible.

Apache, no more certificate chains

The new format of the certificate CRT file is to include the intermediate certificates as well.

If you buy one of the cheaper certs, you're going to get intermediate certs along with the certificate for your site.

The easy way is to cat the cert onto your cert:

cat IntermediateCert.crt >> my.server.crt

">>" means append.

However, the gotcha is that you need to append them in order. So after your cert, you need the intermediate cert for the system that created your cert.

To discover this, use OpenSSL, like so:

Django migrate MySQL error 1005 105, can't create table

When you have Django's migrations making foreign keys, you might hit this error, number 1005 or 105.

This may be happening because foreign key constraints can be applied only to identical columns that are unique.

So, check that they're unique, and add an index. (If you try to add the index, it'll fail if the values are not unique.)


Then, if you still get the error, check that the character sets are the same on both tables. (I don't think Django's db reflection keeps track of that.)

Syndicate content