Category Archives: Administrative

netninja-old

17 years of Netninja

Today Netninja.com turns 17. It’s been a long jour­ney through sev­eral dis­tinct phases. The early his­tory is a lit­tle fuzzy in my mind. This lit­tle nar­ra­tive is my best-effort attempt at recall­ing the details, to bet­ter doc­u­ment them for the future.

defcon-2-logo-8My first glimpse into web­pages was at DefCon 2, the hacker con­ven­tion in Las Vegas in 1994. That was after com­mu­nity col­lege, just as I was get­ting set­tled in to a four-year uni­ver­sity. I’d been using the inter­net (through school) for some time. It was all mail­ing lists, usenet groups, FTP, and gopher sites. I’d either not heard of web pages, or I had but they hadn’t reg­is­tered solidly on my radar. At DefCon, there was some talk about using the inter­net to order pizza. The archi­tec­ture was some­thing dumb and hacked together, like a web­page hooked to a fax­mo­dem. But I didn’t quite get it. The colon-slash-slash and all that. I hadn’t seen URIs before. They were a com­bi­na­tion of for­eign and famil­iar. I could see how they might be use­ful short­hand for ftp://example.com@username:password/folder/file.txt, but this “http” thing was new. I learned quickly. It wasn’t too log after that that I ran my own lit­tle web page from the tilde-home direc­tory of the school’s com­puter. It was about as cheesy and bad as you’d expect.

netNinjaFast-forward three years. Between hacker talk and lit­tle plas­tic ninja toys dis­pensed from vend­ing machines, “net ninja” had become a reg­u­lar part of my vocab­u­lary. In the inter­ven­ing time, I had also learned a lot about writ­ing and host­ing web pages, includ­ing the fact that a nor­mal Joe — not directly asso­ci­ated with an edu­ca­tional facil­ity or cor­po­ra­tion — could pur­chase and use a domain name. This would have been the sum­mer lead­ing up to DefCon 4. June 1997, specif­i­cally. I grabbed the domain name and put up a web­site. I don’t have any imme­di­ately avail­able archives of that site. You can rest assured that it had a black back­ground and hor­i­zon­tal rules ani­mated with drip­ping blood and torches.

Since the begin­ning, I had a robots.txt file block­ing it from being indexed by search engines (and archive.org’s way­back machine, for that mat­ter). My line of think­ing was that you had to know about the site through some­one or some other site. You couldn’t just dis­cover it on Yahoo or AltaVista. Unfortunately, that also blocked it out from being archived. I think I may still have a cvs repos­i­tory some­where around here with the early his­tory, but it’s likely on a CD that is slowly dete­ri­o­rat­ing. Although I care enough about Netninja’s anniver­sary to write this post, I don’t care enough to find and dig through an old source con­trol sys­tem. The ear­li­est cap­ture on archive.org was from 1998, a year and a half after start. This was the sec­ond or third major revi­sion of the site.

netninja-19981212

spin_ninja21998: black was the new black and webrings ruled the inter­net. The site was basi­cally a col­lec­tion of sta­tic pages. I think there might have been a lit­tle bit of PHP glue to main­tain a nav­i­ga­tion, but it was mostly hard-coded web con­tent. The major­ity (or pos­si­bly entirety?) of the site was devoted to hack­ing and friends. You’ll note that “Brian Enigma” and “The Ninja” are two sep­a­rate entries. It’s been clear in my mind from the start that they are two sep­a­rate enti­ties.  I am not “a” or “the” Netninja. Netninja is either a gum­ball machine toy or a mys­te­ri­ous entity, depend­ing on con­text. And yet, the major­ity of email I received usu­ally equated the two.

netninja-20000304

smallbutton2_blinkBy 2000, I’d upgraded from Notepad.exe to vi. And hand-tested every­thing in Netscape and Lynx. Screw Internet Explorer. <hipster>You’ll note that I was steam­punk before steam­punk was cool.</hipster> I even 3D mod­eled and ani­mated the glow­ing but­tons myself. And yet, I hadn’t yet learned that webrings were lame.

netninja-20020914

By 2002, I’d writ­ten an honest-to-goodness blog­ging engine. We have the same bad steam­punk stylings, but all the pages switched from html to php, with a com­mon nav­i­ga­tion.

netninja-20040402 netninja-20050403

We go through a cou­ple iter­a­tions of the same, 2004 and 2005, improv­ing nav­i­ga­tion and adding a side­bar.

netninja-20070723

The biggest change (in infra­struc­ture and con­tent) was about 2007. I moved from my cus­tom site code to run­ning an instance of WordPress. This meant I could import a bunch of LiveJournal con­tent (of ques­tion­able qual­ity) going back to 2001. Typical LJ con­tent was what I did that day, navel-gazing intro­spec­tion, and angsty posts about music, movies, and tele­vi­sion. Existing hacker-related con­tent from the “old” site had to be man­u­ally migrated. The impor­tant stuff did, but I left a lot out. The new site for­mat also meant it was much eas­ier to post new con­tent. Adding a page to my cus­tom site frame­work usu­ally involved writ­ing HTML files that the tem­plate would pick up, pos­si­bly mak­ing changes to the tem­plate itself, and sync­ing the whole thing from my desk­top to the web­site. With WordPress, of course, you just open the edi­tor page and start typ­ing. Easy.

netninja-20090109

corporate_americaBy 2009, my pri­mary blog­ging engine was WordPress run­ning on Netninja. Everything got auto­mat­i­cally cross-posted to LiveJournal and a lot of the com­ment dis­cus­sion lived there, but the con­tent was mine. It lived here. I also did some tem­plate cus­tomiza­tion (though the css is a bit glitchy in the archive.org cap­ture) to make my site feel a bit more like LiveJournal, with cus­tom per-post user icons (such as the bar­code flag here).

netninja-20091017netninja-20100308netninja-20110728

We next go through a few more wood-grain iter­a­tions while the con­tent sub­tly shifts from per­sonal diary to things other peo­ple might actu­ally care about. That lat­ter ver­sions add a bit of parch­ment paper.

netninja-20111113

By 2011, Netninja.com is much more focused on tech and Portland and less about my daily life. We’re also in the graphic design phase I lov­ingly call “I can’t read this thin serif text on that Apple-inspired linen back­ground.”

netninja-today

We then, of course, have today’s Netninja. And that ret­ro­spec­tive con­cludes our digres­sion back to navel-gazing.

Posted in: Dear Diary

november_2013

My 2013 blog-writing month recap

At the start of November, I decided that I would chal­lenge myself to a month of blog posts, sim­i­lar to my friends and acquain­tances par­tic­i­pat­ing in National Novel Writing Month (NaNoWriMo). Well, the month is up and the results are in.

Blog Writing Month, 2013
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

The green spots indi­cate suc­cess­ful days, the red, days with­out a blog post. A 43% suc­cess rate. Not as great as I’d hoped. The month started strong, but fell apart in that fourth week with a weak attempt at recov­ery in the fifth. My expec­ta­tion was that I’d write a week’s worth of posts on the week­end, then queue them up to auto-post dur­ing the week, per­haps play­ing some mid-week catch up if I did not man­age to write enough on the week­end. What I ended up with were a lot of busy week­ends and last-minute posts.

During nor­mal times, I would write a post at any ol’ time then queue it up to auto-post at 8am the next day. I have a num­ber of rea­sons for this, none of them par­tic­u­larly com­pelling. This month, the major­ity of blog posts were late in the evening, account­ing for last-minute writ­ing.

So it was a stretch to keep up, not for lack of con­tent — I still have a back­log of top­ics — but for lack of writ­ing time.

Posted in: Dear Diary

nanowrimo-crest

A month of blog posts

nanowrimo-crestHello, reader. You may notice that I did not write a sin­gle blog post in October. Or maybe you didn’t because it’s been so long since I wrote some­thing and you for­got about me. That’s not because my life was empty and unin­ter­est­ing. On the con­trary — I had quite a few fun and suc­cess­ful projects, a cou­ple that failed in inter­est­ing ways to learn from, and all sorts of hap­pen­ings. I have a back­log of just over a dozen blog posts, some par­tially writ­ten, some out­lined, and some with just a topic sen­tence. I just need to com­mit those to “to paper.”

In related news, I have a hand­ful of friends and cowork­ers par­tic­i­pat­ing in National Novel Writing Month (NaNoWriMo). Although I appre­ci­ate the idea, I’m not a novel writer and don’t feel the need to par­tic­i­pate. BUT I thought I might make up a sort of National Blog Writing Month as a way to loosen up and start writ­ing again. (It turns out that sev­eral other folks have come up with the same idea with vary­ing qual­ity of abbre­vi­a­tion: NaBloPoMo, NaBloWriMo, NaNoBlogMo, and so on.)

So here is my goal. I have doubts as to its attain­abil­ity, but will try my best. I would like to post a blog post of sub­stance every day. That doesn’t mean writ­ing a few sen­tences or blindly link­ing to a YouTube video. I’d rather skip a day than write a fluff piece. Exact word count num­bers don’t mat­ter to me. I know what a “real” topic is and each takes a vary­ing num­ber of words. Most impor­tantly, I do not want to insult myself or you, reader, by tak­ing up time and atten­tion with junky posts about noth­ing.

As I said, I have doubts. I don’t think I will be able to write a post a day (or rather post a post a day, as I tend to write them on the week­ends and sched­ule pub­lish­ing dates through­out the week). But at the end of the month, I’ll count up the num­ber of posts I write, divide that by the num­ber of days (30) and arrive at a per­cent­age. And next year? That gives me a goal to hit.

And this. This is the, as the inter­net youn­gins say, FRIST [sic] POST!

front_view

Introducing InfoNinja

Say hello to InfoNinja.

InfoNinja is an Open Source Ethernet-connected desk­top heads-up dis­play. It works in tan­dem with a desk­top com­puter to give you an at-a-glance sec­ondary dis­play of both text and ambi­ent (color/blink/fade) infor­ma­tion.

It is also a tea timer.

 You can learn more at the project pages:

The source code, schemat­ics, laser-cutter files, and assorted other design doc­u­ments are at the GitHub repos­i­tory: https://github.com/BrianEnigma/InfoNinja

Posted in: Gadgets Projects

Netninja-2011

Netninja: looking back on 2011

Happy 2012

2011 was the year of 3D.  No, not movies, silly glasses, and headaches.  It was the year of MakerBot, BlenderOpenSCAD, and Thingiverse.  In fact, it was the year I had to con­vert the term “maker­bot” from a tag to a full-fledged cat­e­gory here on the blog.  3D print­ing was a cen­tral con­cept, but orbit­ing it were the con­cepts of design, mechan­i­cal engi­neer­ing, and mate­ri­als engi­neer­ing.

2011 was also a year of read­ing.  The 2011 com­mute leaves more time for read­ing and pod­casts than the pre­vi­ous com­mute.  I tried to mix it up 50/50 between fic­tion and non-fiction; I love to learn, but some­times I just need a good story.  The pub­lish­ing land­scape is chang­ing in much the same way the music land­scape did a few years back — well, maybe slightly dif­fer­ently due to lessons learned.  We’re see­ing more peo­ple pub­lish directly to the Kindle.  I find this excit­ing!

The last quar­ter of 2011, I started to get more into hob­by­ist elec­tri­cal engi­neer­ing focused around micro­proces­sors.  I’ve always had the pro­fes­sional skill, but haven’t always felt like tak­ing the time to also pur­sue this as a hobby.  Typically, there is a lot of design and redesign.  You either send off for cus­tom boards (with long spaces of time between iterations/bugfixes) or you do it your­self with tedious tech­niques like wire-wrapping, point-to-point sol­der­ing, or messy tech­niques involv­ing dan­ger­ous chem­i­cal sol­vents.  There is a lot of time spent in board bring-up.  Each micro­proces­sor tends to have dif­fer­ent quirks and dialects when it comes down to writ­ing firmware.  Many have com­pil­ers that work best (or only work at all) on things like Windows 2000.  I have dab­bled in the Arduino before, but 2011 felt like the year that it really started to hit crit­i­cal mass.  It is a pre-made board that has a slick devel­op­ment envi­ron­ment and, most impor­tantly, is fairly cheap ($30).  It is also mod­u­lar.  Much like Legos, you can snap on bits and pieces to give you added func­tion­al­ity — Ethernet, WiFi, audio, video, GPS, RFID, and so on.  The only “real” project I made was the Halloween/Christmas porch lights, though I have two other projects in var­i­ous states of not-yet-working and am still think­ing up new ideas.

Word Cloud

Many blogs post a year-end word cloud.  Here is my cloud for 2011.  It does a great job at reflect­ing the above top­ics.  I really like how the cen­tral theme ended up being “design some­thing.”

Statistics

I pulled up some sta­tis­tics from the past year.  They go on to prove that Netninja is nei­ther a big nor small blog: no less than 100 vis­i­tors per day, but no more than about 400, with a total of 63K uniques.  The bounce rate and visit length can cer­tainly stand to have some improve­ment.

That big spike at the end of December rep­re­sents all of the peo­ple who pre­vi­ously had a Kindle and that got a new iPad for Christmas and wanted to know how to migrate their DRM-locked con­tent to iBooks.

Most of the incom­ing traf­fic were peo­ple search­ing for Kindle/iPad DRM infor­ma­tion, inex­plic­a­bly peo­ple look­ing for infor­ma­tion on the Cloverfield mon­ster (Really? That movie was so 2008!), folks look­ing for a Scrabble Cheat Sheet, and a vari­ety of Hipster PDA-related stuff.

The top browsers were Firefox (30%), Chrome (24%), Safari (24%), and Internet Explorer (16%).  The top oper­at­ing sys­tems were Windows (57%) and Mac (25%) fol­lowed by the iPad (6%), iPhone (5%), Linux (4%), and Android (1%).  Ouch.  Linux trails behind the iDe­vices.  But 2012 will be the year of the Linux Desktop!  I just know it!  2011 was sup­posed to be, pre­vi­ously 2010, pre­vi­ously 2009, pre­vi­ously 20XX, but 2012 will finally be the year, I tell you!

The Year Ahead

I hope that 2012 will be a good year of doc­u­ment­ing more and more projects.  Previously to 2011 most of the projects I’ve doc­u­mented here were strictly soft­ware.  That changed a bit last year, but I hope to con­tinue the trend into elec­tron­ics, 3D print­ing, car­pen­try, and any­thing else that could give peo­ple instruc­tional infor­ma­tion or inspi­ra­tion.

Posted in: Dear Diary MakerBot

My current WordPress plugins

Because I have a friend who is kick­ing off a new WordPress-powered blog (Hi, Substitute!), I thought I’d list the plu­g­ins I use here at Netninja.com.  I have a whop­ping 32 of them, but many are sim­ple single-purpose things that are likely not of gen­eral inter­est.  My plu­g­ins can be be bro­ken down into a few cat­e­gories:

Administrative

  • After The Deadline — A spelling and gram­mar checker when writ­ing posts.
  • Akismet — Spam blocker
  • Categories to Tags Converter — I some­times get enough posts with a given tag, that I decide to pro­mote that tag to a cat­e­gory.  This plu­gin lets me do that.
  • Dashboard Links — This is just a sta­tic block of arbi­trary HTML you can put on your admin­is­tra­tive dash­board.  I use it to hold links to met­rics (Google Analytics, FeedBurner, etc.)
  • FeedBurner FeedSmith — Route your RSS through FeedBurner
  • Google Analytics for WordPress — Automatically inserts the magic JavaSript for Google Analytics with­out mess­ing directly with your theme files.
  • Google XML Sitemaps — Generates XML sitemaps for bet­ter Google index­ing
  • Maintenance Mode — Out to lunch, back in 5.
  • OpenID — I use netninja.com as an OpenID server.  This pro­vides that func­tion­al­ity.  It also pro­vides OpenID client func­tion­al­ity, like if some­one wants to leave a com­ment under their Blogger/LiveJournal/Yahoo/whatever account.
  • RSS Footer — A bit of boil­er­plate at the bot­tom of each RSS item, used to help pre­vent spam­mers from har­vest­ing my RSS for link farms.
  • WP Super Cache — A WordPress site with­out this will not hold up after being linked to by Digg, Slashdot, Reddit, etc.
Social/RSS
  • Get Comments Count — Comment count as an updat­ing image, so that RSS always has the cor­rect num­ber of com­ments.
  • Sociable — Buttons for folks to like it on Facebook, dig it on Digg, etc.
  • Subscribe to Comments — Allows peo­ple to sub­scribe to com­ments on a given post via email.  This is a lot eas­ier than try­ing to dig up the comment-specific RSS feed.
  • Twitter Tools — Tweet your posts, pull your recent tweets into the blog.
  • Twitter Tools Shortcode — Automatically short­ens the links when you tweet your posts.
  • Twitter Tools nja.me short­ener — I wrote this to over­ride Twitter Tools’ default short­code and instead us my own nja.me ser­vice.
  • Wordbooker — cross-post to Facebook
User Interface
  • Flickr Gallery — I use this to show recent Flickr posts on the home­page
  • Gravatar Hovercards — Fancy dis­play of Gravatar infor­ma­tion
  • Hipster PDA Shortcode — I wrote this to insert some boil­er­plate text at the top of all my Hipster PDA pages
  • List Pages Shortcode — I use this to show recent page updates on the home­page
  • Netninja Custom Meta — I hacked this together to stuff some spe­cific meta tags in all the head­ers
  • New Tag Cloud — The tag cloud on the home­page
  • NuRealm Get Posts — I use this to show the recent blog posts on the home­page
  • Popular Posts — I use this to show the most pop­u­lar posts in the side­bar
  • Post-Plugin Library — Prerequisite for Popular Posts and Recent Comments
  • Recent Comments — Show the recent com­ments in the side­bar
  • Snazzy Archives — Fancy graphic archives.  This cur­rently has a lot of left/right scrolling on the new theme; I’m work­ing on it.
  • WPTouch — All the magic CSS bet­ter iPhone access
  • Yet Another Related Posts Plugin — If you liked this post, you might also like...
At one point, I was using wp-typography and Extra Sentence Space.  The for­mer did some really nice hyphen­ation (though at the expense of cut-and-paste time­times hav­ing weird unprint­able junk in it) as well as con­vert­ing em-dashes and turn­ing reg­u­lar amper­sands into fanci­ness in alter­na­tive fonts.  The later enforced two spaces after a period.  They both sort of ate up a lot of CPU and as much as I liked them, they weren’t worth the extra bump in host­ing costs required to keep them run­ning.  The default WordPress install han­dles smart quotes and con­vert­ing space-hyphen-hyphen-space to an emdash fairly well.
I would also like to point out the new theme I am using.  I finally dropped Thesis as my theme and went with the default twen­tyeleven with a cus­tom CSS.  I’m not 100% happy with it yet, but like its visual and admin­is­tra­tive sim­plic­ity.

Farewell, Facebook

My first web­site was born in 1995.  Previous to that, I had par­tic­i­pated in a few mail­ing lists and lurked on Usenet, but that was my first pub­lic inter­net pres­ence.  Those were the days before back­ground images, before cas­cad­ing stylesheets, before, even, the <blink> tag.  Most days, my browser of choice was Lynx — mainly because there was always a line for the X work­sta­tions, whereas the amber Wyse ter­mi­nals were always free.

My first foray into what might now, loosely, be called “Social Media” was LiveJournal in mid 2001.  Back then, it was called blog­ging.  Marketing hadn’t intro­duced the term “Social Media” yet.

In 2007, I set up my own blog.  I posted there in par­al­lel with LiveJournal.  I liked the con­trol of host­ing my blog.  I liked own­ing all of my own con­tent on my own server.  Perhaps most impor­tantly, LJ was start­ing to do some “funny” things with regard to how it was admin­is­tered and self-policed.

In mid 2008, I cut ties with LiveJournal. Although [info]brad had done some great things to design and imple­ment OpenID in LiveJournal, he left LJ to do his own things and their imple­men­ta­tion of OpenID, among other things, got fur­ther and fur­ther busted.  There had recently been a scan­dal of some sort that seemed impor­tant then, but is entirely for­get­table now.  I still main­tain an LJ account and use it for read­ing friends over there, but never use it for post­ing any­more.  (Spoiler alert: I’ll be doing the same for Facebook.)

Most recently, I have been using Facebook.  And by “using,” I mean “using it as a dump­ing ground for all of my social media activ­i­ties.”  My tweets go there as sta­tus updates.  My Flickr uploads are imported, as are my Pandora likes, Digg activ­ity, and what­not.  In recent years, Facebook has taken everyone’s pri­vacy and peed on it.  In recent months, they’ve pooped on it.  #seri­ously.

When Facebook started, most every­thing was pri­vate.  The delin­eation between pub­lic and friends-only was quite clear.  In fact, by default, most of your set­tings were pri­vate.  Recently, they made a change such that every­thing that was pri­vate sud­denly became pub­lic.  After all, it is dif­fi­cult to show up in Google search results (which they need, to get incom­ing clicks, to mon­e­tize with ads) if the whole site is marked “pri­vate.”  You can see in the fol­low­ing ani­mated chart (taken from “The Evolution of Privacy on Facebook”) how they’ve grad­u­ally made every­thing but your con­tact info and birth­day pub­licly default.  Now they are talk­ing about a Foursquare/Gowalla clone, and you can bet that they’ll want to make your loca­tion pub­lic so they can bet­ter serve local­ized ads.

Facebook, as a com­pany, cares very lit­tle about its users.  They recently rolled out the abil­ity for third-party sites to put a “Like” but­ton on their pages.  Did you know that click­ing it gives that site carte-blanche to dump updates into your news feed?  Even if you do not click, those “Like” badges will end up being “web bugs” to bet­ter track your trav­els across non-Facebook web­sites and link them against your Facebook adver­tis­ing pro­file.  Did you know that tak­ing a quiz on Facebook not only gives your infor­ma­tion to the quiz owner, but also pri­vate details about all of your friends with­out their direct con­cent?  Facebook is now under inves­ti­ga­tion by the FTC.  Recently, they had a huge bug allow­ing you to peek at your friends’ steamy online chat logs.

Of course, you can man­u­ally man­age all of your pri­vacy set­tings — you just have to nav­i­gate through 50 set­tings to reach the 170 spe­cific options to do so.  (That same linked arti­cle com­pares the length of pri­vacy poli­cies and notes that Facebook has the only one longer than the United States Constitution.)

As I stated above, Facebook has very lit­tle con­cern for its users.  It seems to have less and less over time.  My own web­site?  I can con­trol that.  Twitter?  It’s sim­ple and straight­for­ward.  Either every­thing is private/friends-only or every­thing is pub­lic.  Flickr?  It has a sim­ple set of shar­ing lev­els for fam­ily, friends, and every­one else.  Changes to the pri­vacy pol­icy of these other sites are not sud­den, jar­ring, or insult­ing.

People are leav­ing Facebook.  People whose opin­ions I respect and trust.  I am not to the point where I feel com­fort­able doing that yet, but any­one fol­low­ing me on Facebook is going to see much less of me there.  I have deleted the Facebook app from my iPhone and I will grad­u­ally be phas­ing out my post­ing there over the next week.

Diaspora is look­ing like a for­mi­da­ble oppo­nent to Facebook and will have the advan­tage of being an open pro­to­col and plat­form, much like email and web browsers are today, as opposed to a plat­form owned and con­trolled by a sin­gle com­pany.  They have noth­ing to show yet, but their the­ory and fund-raising look promis­ing.  I will cer­tainly keep my eye on them.

In the mean­time, you can find me as BrianEnigma on Twitter, Flickr, Foursquare, Digg, FriendFeed (owned by Facebook, yes, but still seem­ingly autonomous and free of Facebook’s pri­vacy nas­ti­ness), or just read my blog here on netninja.com.

Posted in: Dear Diary

What did Netninja look like in 2009?

This post is a bla­tant ripoff of Rick Turoczy’s Silicon Florist word cloud, but that’s how memes work, right?  I made two dif­fer­ent 2009 word clouds for Netninja: one for just titles and one for full post con­tent.  I’ll get into the “how” after the images.

This first image is of just titles.  I guess you can infer that I did a lot of talk­ing about Portland and Ignite, talk­ing about gad­gets (iPhone, Kindle, Apple), and blogs (LiveJournal, WordPress, Netninja).

The sec­ond image is for post con­tent and con­tains a lot more mun­dane words.  A few words carry over from titles, like Kindle and Portland.  Apparently, I, like, use the word like a lit­tle, like, too much.

To gen­er­ate the word map for post con­tent took two steps.  First, I had to extract the text from the MySQL server that my WordPress instal­la­tion is using.  I have a shell account to my web server, so all it took was a simple(-ish) Unix com­mand.  If you only have access your data­base through PHPMyAdmin or other GUI tool, you may have to fig­ure out how to do this a dif­fer­ent way.  The com­mand I used was:

mysql -uUSERNAME -p -hDBHOST --batch --skip-column-names -e 'select post_content from wp_posts where post_date between "2009-01-01" and "2010-01-01" and post_status="publish" and post_type="post"' DBNAME | perl -pne 's/<.*?>/ /g' | perl -pne 's/\x5Cn/ /g' > post_content_2009.txt

Obviously, replace your user­name, server name, and data­base name where appro­pri­ate.  Then type your data­base pass­word when prompted.  The con­tent of all of your 2009 posts ends up in post_content_2009.txt.

Specifically, what this does is:

  • Extracts the post con­tent from the data­base between the dates spec­i­fied (1 January 2009 at 00:00 and 1 January 2010 at 00:00)
  • Only pub­lic posts, not pages, drafts, or revi­sions
  • Strips out HTML tags
  • Strips out the lit­eral string “\n” (rep­re­sen­ta­tive of new­lines)
  • Puts the result in post_content_2009.txt

You can then open post_content_2009.txt in a text edi­tor, select all, copy, and paste the text into Wordle and play with fonts, col­ors, and cloud shapes.

You can do a sim­i­lar thing, but with only post titles by using a sim­i­lar com­mand (replac­ing “con­tent” with “title” in the above com­mand):

mysql -uUSERNAME -p -hDBHOST --batch --skip-column-names -e 'select post_title from wp_posts where post_date between "2009-01-01" and "2010-01-01" and post_status="publish" and post_type="post"' DBNAME | perl -pne 's/<.*?>/ /g' | perl -pne 's/\x5Cn/ /g' > post_title_2009.txt

Posted in: Pictures

Netninja site changes: Hipster PDA & Code

Background

I have talked about my rela­tion­ship with the Hipster PDA for years.  It is a sort of love/hate thing.  I find that the basics are invalu­able.  I really love all the beau­ti­ful lit­tle tem­plates and forms that peo­ple have made for the 3″ x 5″ form fac­tor.  Alas, I find that most — if not all — of those tem­plates are all but use­less to me.  A blank page has so much poten­tial.  ANYTHING you can think of (well, that fits between the mar­gins) can go on there.  Once you start adding fill-in lines and check boxes and cal­en­dars and what­not, its util­ity becomes less gen­er­al­ized and more spe­cific.  You sud­denly have to carry around blank index cards, blank Form X cards, blank Form Y cards, blank Form Z cards, and what­not.  Uh-oh, I ran out of todo-list forms.  I guess I can’t do any­thing until I print out more.

That being said, I am going to get all hyp­o­crit­i­cal and men­tion the forms I have cre­ated for myself.  They work for me, they may not work for you.  Before I do that, though, I am going to men­tion the changes to Netninja.com.

Yesterday’s Changes

Yesterday, when adding sev­eral new Hipster PDA tem­plates to the site, I real­ized that one giant page with all the tem­plates had become a less-than-ideal way of pre­sent­ing them.  I rearranged things (thank you, WordPress as a con­tent man­age­ment sys­tem!) so that a top-level index led you to the indi­vid­ual PDF sheets.  In doing this, I also real­ized that the “Projects” sec­tion of my site is exclu­sively related to code I have writ­ten — except for the Hipster PDA “project,” which is, effec­tively, a bunch of PDF forms to print.  I decided to pro­mote those to a new top-level nav­i­ga­tion hier­ar­chy.  If you are read­ing this on the site (as opposed to in your RSS news­reader), you will see the new “Hipster PDA” tab up top.

I also tweaked the front page of Netninja.com to bet­ter call out inter­est­ing and pop­u­lar projects.  Previously, it was a dynamic list of recently updated project pages, but in look­ing through my logs I real­ized that few peo­ple care that the crude JavaScript-Minesweeper pro­to­type was updated recently if that causes more pop­u­lar things like LJProxy, wmap, or the Hipster PDA pages to drop off the list.

The New Hipster PDA Section Introduction

The fol­low­ing is the intro­duc­tion to the new top-level Hipster PDA sec­tion of Netninja.com.  It cov­ers what I men­tioned above, but in a lit­tle more detail.

Over the years, I have been a big fan of pro­duc­tiv­ity tools. Back in the day, I would drool over the vari­ety of dayrun­ner fold­ers and their page inserts. Later, it was pro­duc­tiv­ity soft­ware. After that, sys­tems and frame­works and gim­micks and what­not. I kind of stopped when I hit the “Hipster PDA.” Admittedly, I did not imme­di­ately stop there. I played with all the tem­plates, espe­cially the D*I*Y Planner tem­plates. There is so much poten­tial, so much hope, in those tem­plates. I fell in love with the idea of those tem­plates, but dis­cov­ered most of them were just not as use­ful or flex­i­ble as a blank index card. As cool as they are, I had to give up most of those tem­plates.

I dis­cov­ered that, for me, there are two main types of Hipster PDA index cards that are use­ful. Your mileage may vary, but for me, there are two:

  1. The blank card. Okay, tech­ni­cally, I pre­fer the graph paper index cards from Levenger because I’m a nerdy engi­neer, but most peo­ple would con­sider these “blank.”
  2. The pre-printed ref­er­ence card. There are times when I want to have some­thing on-hand to look up at a moment’s notice. And I really do mean a moment’s notice — not take out the iPhone, turn it on, enter the lock code, launch Evernote, search for the note I’m look­ing for, then open it.

The blank card is just that. There is no sys­tem or tem­plate that can help there. The pre-printed ref­er­ence card is mainly cus­tomized to me and my life, but might be use­ful to oth­ers — or at the very least, may serve as inspi­ra­tion. For instance, I have one for work as a ref­er­ence for things like model num­bers and pro­gram­ming con­stants that is of lit­tle inter­est out­side the work­place. I have a pre-printed shop­ping list where I can just tick off the things I need; the items are spe­cific to me and my life but oth­ers may find them use­ful. The style, with dif­fer­ent items, could work for oth­ers.

The New Templates

You will have to hit up the Hipster PDA tem­plate list­ing to view all tem­plates, old and new.  Yesterday’s newly added tem­plates include:

Scrabble Cheat Sheet

thumbnailThe Scrabble Cheat Sheet is a ref­er­ence of high-scoring and unique words in Scrabble. This includes Q-without-U, words with large num­bers of con­so­nants, and large num­bers of vow­els.

Portland Map

thumbnailThis is the first revi­sion of a not-quite-to-scale down­town Portland map with the bus routes and stops that I am pri­mar­ily inter­ested in. It served well over Christmas, in that I could mark down the loca­tions of stores I rarely fre­quent. I know the loca­tions I typ­i­cally go to and their prox­im­ity to bus stops, but needed a good memory-jog for those rarely-visited loca­tions.

Title Page

thumbnailThe Title Page is a quick ref­er­ence of my con­tact infor­ma­tion as well as a phone list for impor­tant num­bers. It serves three pur­poses. First, I never remem­ber my own phone num­ber, so it’s nice to have it avail­able at a glance. Second, if my phone (where I keep all of my phone num­bers) breaks and I need to call some­one for help from another phone, I have impor­tant num­bers. Third, if I’m found uncon­scious in a ditch, the author­i­ties can see who to call.

Posted in: Code

Snazzy-Archives, Filtered

Note that this post is a dupli­cate of the Snazzy-Archives, Filtered project page, here at Netninja, and copied into the blog. It has been inserted here to make it part of the blog time­line, RSS, and what­not so that it gets noticed. Comments are dis­abled on this post but enabled on the project page, so go there to com­ment.

Earlier this year, I got seri­ous about the post archives here at Netninja.com. I added meta­data for sev­eral years worth of posts. Partly this was me being anal-retentive and partly this was to facil­i­tate bet­ter search­ing, brows­ing, and match­ing related posts. This was a suc­cess­ful project, but exposed what I believe to be a defi­ciency in WordPress: Although search­ing and serendip­i­tously falling into related posts is easy, there is no easy way to browse sev­eral years worth of posts.

I ini­tially used Clean Archives Reloaded for brows­ing old posts. As I under­stand it, Clean Archives Reloaded was writ­ten by a Portland local. This worked fairly well, but didn’t play well with the wp-typography plu­gin I use. Wp-typography takes text and replaces reg­u­lar quotes with smart quotes, pro­motes com­bi­na­tions of dashes to fancy em– and en-dashes and what­not. With the size of my archives, the web server croaked due to mem­ory usage. I patched wp-typography to ignore this page, but every time I upgraded the plu­gin, my changes would get over­writ­ten and I would inevitably for­got to re-edit the rel­e­vant files, leav­ing my archives bro­ken.

I finally gave up and started explor­ing other options. Snazzy Archives looked rather nifty. I tried it out and it... mostly worked. Due to the size of my archives, it took for­ever to gen­er­ate the page. The browser chugged along try­ing to dis­play it. I would often get Error 500 from my web host due to the server load of gen­er­at­ing the page.

snazzy-archives

This plu­gin uses a short­code to invoke: [ snazzy-archive ] (with­out the spaces — I did not want to invoke the archive here). You sim­ply cre­ate a page, add that short­code to the page, and it gets replaced by the fancy archive.

What I ended up doing was hack­ing the plu­gin so that the short­code takes an optional “fil­teryear” argu­ment. If miss­ing, all years are dis­played. If present, the results are fil­tered to just that year. In this way, I can cre­ate sep­a­rate pages for 2001, 2002, 2003, and so on. This makes the ren­der­ing, dis­play, and pre­sen­ta­tion much more man­age­able. It can then be invoked with: [ snazzy-archive filteryear="2008" ]

The patch is down below, for those that care. I will be sub­mit­ting it to the author soon. My next step is to fig­ure out the CSS enough so that the miss­ing right-hand mar­gin on the archive pages can return.

For the exact patch and to leave com­ments, please go to the project page at http://netninja.com/projects/snazzy-archives-filtered/.
Posted in: Code Projects