Category: Programming
-
Bummed about pixels
CSS media queries are kinda bummed but I think I see the point. The point being: a pixel is now considered whatever the hell a pixel is, and points, picas and inches are only accurate in print media, not screen media. This is because the computer manufacturers out there are not interested in providing a […]
-
See a new wallpaper after every suspend
My ubuntu 14.04 is getting crusty and I don’t think that Mate helped it out greatly, but I marginally like Mate better than XFCE. However, whenever my computer wakes from suspend, my wallpaper background image is all black and kinda messed up. So I read this example of making a suspend-resume hook. And here is […]
-
Creating Stop Motion Video
For fun today, Jesse constructed a stop motion scene with legos and a hand-drawn backdrop. Meanwhile, I wrote an animation process. I wrote it as two scripts: one to resize input from my camera, the other to actually animate the pictures. My ImageMagick resize script is reasonably simple, and if you search for other animation […]
-
Parenting and Teaching Programming
At what level of programming are we actually imparting the philosophy of human thought? Or, another way, a basic program that prints out a few numbers is truly trivially basic: it merely teaches some programming syntax. However, contrast your smartphone apps to your old DOS/Windows apps. A significan understanding of human haptics and intuition have […]
-
Crazy Perl Day
I’m surprised that this is the first time in Perl that I’ve bothered to use the posix character class [:alnum:]. Check this nuttiness out: ($::port_name, $::first_port, $::last_port) = $::port_range =~ /([[:alnum:]]+[^[:alnum:]])(\d+)-[[:alnum:]]+[^[:alnum:]](\d+)/; Yeah…it’s better with coffee.
-
CSS pulldown menus, the trick
The real trick to css pulldown menus is the :hover pseudo selector. You knew that. However, the insight comes in learning that the :hover pseudo can be used anywhere in the middle of your CSS selector. This allows you to build up the a selector representing a mouse action that selects a child element of […]
-
Keep that Laptop from Racing thru Battery
Linux and Laptops: a long, old story. However, one that with a bit homework, helps get the most out of your battery. Using powertop, you can see your energy usage profile and your device power settings. The downside to powertop is that you cannot “export as shell script.” (Seriously, y u no export?) To get […]
-
This is not the nastiest perl I’ve ever done…but dang.
This is a stanza where, given a comma separated list of keywords to match on, find the values after the colon. The values could be empty and at the end of a line. I would be delighted to find an even simpler way to do this. my $matcher = ” (“.join(‘|’, keys %option_map).”):”; my @matches = […]
-
uh…remind me how to begin a perl script?
Don’t let me forget to do this at the start of my perl scripts at work: package main; use strict; use warnings; use Carp; $SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; use Scalar::Util; #::looks_like_number; # Un-buffer output $| = 1; # this is pedantic necessity for the following use statements use lib […]
-
PH7 Engine – is it really the fix?
This sounds very useful, especially if you consider that PHP is used in embedded environments like MonoWall and pfSense. My big question for larger installation is this: xcache already does a great job at bytecode caching. The largest slowdown in the majority of PHP applications is the relational engine sitting underneath it. After much profiling […]