This turned out to be surprisingly difficult to find an answer for; I wanted to, in a node terminal program, wait for and return a single keypress.Continue reading “Get a Keypress in NodeJS”
I've put together a script to schedule the kids' wifi network on our OpenWRT router.
We have a D-Link DIR-835 (with two radios), running OpenWRT Barrier Breaker 14.07. The 2.4GHz network is set up for the kids on radio0, and only the grownups have access to the 5GHz network. I wanted a way to shut off the wifi at Finn's bedtime (which is later than I usually want to stay up) and have it running again in the morning.
Next I wrote a simple script to check the time and bring the wifi up/down based on that, unless the current date is listed in a config file.
The script and sample code are up on BitBucket, at https://bitbucket.org/eroosenmaallen/openwrt-bedtime. Feedback and improvements are welcome.
Inspired by @TheBloggess, I have put together a simple WordPress plugin to fix dates for those with triskaidekaphobia.
Inspired by @TheBloggess, I have put together a simple WordPress plugin to fix dates for those with triskaidekaphobia. Right now it’s pretty trivial; as I refresh myself on WordPress development, I’ll add a few options, etc. In the meantime, all it does is replace the year after 2012 with “The Library” (see In the Library) and the date after the 12th with “12+1”.
The original class did most of what I needed, but I made some minor changes. I've emailed the original contributor to offer my changes back, but until I hear back, I've posted my modified version here:
Comments/feedback always welcome.
I've been using hKit recently for several projects, among them trying to figure out why Rosebleed's user profiles won't import at Satisfaction. In testing, I found that Technorati profiles also don't import.
I tracked it down to two separate issues:
- Technorati uses DoubleClick advertising, which uses
document.write()to drop new scripts into the page. This script-within-a-script seems to confuse the w3's tidy proxy and breaks everything.
I managed to work around this with a big ugly hack in hkit.class.php which attempts to detect the document.write() and fix the damage. It's pretty ugly and probably pretty delicate as well, but it's something.
Feedback is always welcome: Modified hKit 0.5
- Satisfaction uses AJAX to pull the hCard info through a script on their server. The script seems to have the same shortcoming as the Microformatic tool with URLs containing a ?. This one was an easy fix on my end; I updated Rosebleed's profile page to accept the username either from the GET string (
profile.php?user=silvermoon82) or from pathinfo (
profile.php/silvermoon82). The hCard fetcher works with the new format links, so all is well in the universe.