Hacks – DocBug https://www.docbug.com/blog Intelligence, media technologies, intellectual property, and the occasional politics Thu, 25 Dec 2025 22:00:45 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 Pick-a-peg https://www.docbug.com/blog/archives/1363 Thu, 25 Dec 2025 22:00:45 +0000 https://www.docbug.com/blog/?p=1363 Every year for the past 36 years or so my friend Jay and I have exchanged Christmas gifts that are trapped in some way. Open it without disarming the trap and they’ll “explode” (set off a loud cap, sometimes with accompanying flash paper), fire nerf darts, set off an alarm, or the like. For a long time I’d modify thrift-store jewelry boxes, but when I got a home laser cutter I shifted to building bespoke puzzle boxes.

I don’t want to spoil the surprise of this year’s puzzle box (and to be honest I’m still finishing it), but here’s the gift from a few years ago. It’s a thin rectangular box about 5″ long with a plug at the top that’s held in place by two wooden pegs. The pegs are cut halfway through so they can both slide in and out through their respective holes, but each peg blocks the other from being removed. Figure out how to remove the pegs and you can open the box.

Pick-a-peg Puzzle Box

This particular design is based on a 1949 disassembly puzzle called Pick-a-Peg, which I found described in New Book of Puzzles by Slocum and Botermans (a picture of the original can be found here). After some internet sleuthing I found the 1946 patent application that describes the inner workings in detail, and from there I was able to modify the design to work with laser-cut pieces and turn the disassembly puzzle into the locking mechanism for a box. I especially like how cleanly the original puzzle works as a locking mechanism, almost like it was designed with that in mind (though as far as I can tell it wasn’t). I did a similar repurposing with the Handcuffs puzzle, but this is much nicer.

Jay opened it in about seven minutes, though of course some of that time was spent carefully checking for any hidden explosives. My one design critique is that the pegs feel too delicate, to the point where people are afraid they’ll break if they push too hard. If I do a redesign I’ll either use a larger diameter peg or switch to using brass or steel rods.

]]>
Gulf of Mexico https://www.docbug.com/blog/archives/1189 Sat, 15 Feb 2025 19:03:04 +0000 https://www.docbug.com/blog/?p=1189 On desktop Google Maps, if you add “&gl=CA” to the end of your URL then the Gulf of Mexico will be correctly labeled (albeit with the “freedom fries” version in parentheses). You can also get the old name back on both Google and Apple maps using a VPN set to Canada. (Unfortunately the hack doesn’t work for the iPhone apps.)

]]>
Diet Coke and Mentos Traps https://www.docbug.com/blog/archives/791 Sat, 27 Dec 2008 08:12:45 +0000 https://www.docbug.com/blog/archives/791 As many of you know, since 1990 my friend Jay and I have exchanged Christmas gifts that have been booby-trapped in some way. Since last year around this time I was getting married (and have thus been a little distracted from blogging), I've fallen behind in posting details of these traps. I hope to be a little faster in posting this year's traps, but in the meantime I've finally posted Jay's trap from last year: a particularly nasty trap that sets off ten individual bottles of diet-coke-and-mentos geysers on any would-be MacGyver who triggers it. I've also posted my own version of his trap which, while it's not as pretty on the outside, does win out when it comes to the size of the mess it leaves behind. Enjoy!


Diet Coke & Mentos


Diet Coke & Mentos, Version 2

]]>
As many of you know, since 1990 my friend Jay and I have exchanged Christmas gifts that have been booby-trapped in some way. Since last year around this time I was getting married (and have thus been a little distracted from blogging), I’ve fallen behind in posting details of these traps. I hope to be a little faster in posting this year’s traps, but in the meantime I’ve finally posted Jay’s trap from last year: a particularly nasty trap that sets off ten individual bottles of diet-coke-and-mentos geysers on any would-be MacGyver who triggers it. I’ve also posted my own version of his trap which, while it’s not as pretty on the outside, does win out when it comes to the size of the mess it leaves behind. Enjoy!


Diet Coke & Mentos


Diet Coke & Mentos, Version 2

]]>
Wolverine costume with retractable claws https://www.docbug.com/blog/archives/784 Sun, 02 Nov 2008 07:20:40 +0000 https://www.docbug.com/blog/archives/784 wolverine-front.jpg

This year's theme for Halloween was super heroes, so around the beginning of October I set out to design a Wolverine costume. The outfit is based on the X-Men movies, because it's a lot easier to look cool in black leather than yellow spandex. The claws I based on the comic books, with thin claw-like blades coming out of studs on the backs of my hands rather than knives coming out from between my knuckles as they did in the movies. That was both because I like the more animal look of the original and because it made it a lot easier to make the claws retractable.

For more pictures, video and step-by-step instructions on how to design your own, check out my Instructable at instructables.com.

]]>
wolverine-front.jpg

This year’s theme for Halloween was super heroes, so around the beginning of October I set out to design a Wolverine costume. The outfit is based on the X-Men movies, because it’s a lot easier to look cool in black leather than yellow spandex. The claws I based on the comic books, with thin claw-like blades coming out of studs on the backs of my hands rather than knives coming out from between my knuckles as they did in the movies. That was both because I like the more animal look of the original and because it made it a lot easier to make the claws retractable.

For more pictures, video and step-by-step instructions on how to design your own, check out my Instructable at instructables.com.

]]>
View the ‘real source’ of a webpage https://www.docbug.com/blog/archives/782 Thu, 09 Oct 2008 01:18:47 +0000 https://www.docbug.com/blog/archives/782 One great thing about the web is that you can tell your browser to "View Source" whenever you want to figure out how the page managed to get all those hamsters to dance like they do. Or at least that was how it used to be — nowadays most interesting pages are dynamically generated, which means the source you see often little more than .

When I was writing dynamic pages for a project a little while back I got tired of not being able to see what my page looked like after all the JavaScript got done with it, and eventually I tracked down this cute little bookmarklet:

javascript:if (window.document.body.outerHTML != undefined) {''+window.document.body.outerHTML+''} else if  (document.getElementsByTagName('html')[0].innerHTML != undefined) {''+document.getElementsByTagName('html')[0].innerHTML+''} else if  (window.document.documentElement.outerHTML != undefined) {''+window.document.documentElement.outerHTML+''} else {alert('Your browser does not support this functionality') };

Just copy it all into one line (remove the linefeeds, they're just there for readability) and put it as the URL of a bookmark. Then whenever you want to see the real source of a page, it's just a click away.

(I wish I could remember where I found this little gem, but from a quick search it looks like it's been floating around for a while...)

]]>
One great thing about the web is that you can tell your browser to “View Source” whenever you want to figure out how the page managed to get all those hamsters to dance like they do. Or at least that was how it used to be — nowadays most interesting pages are dynamically generated, which means the source you see often little more than .

When I was writing dynamic pages for a project a little while back I got tired of not being able to see what my page looked like after all the JavaScript got done with it, and eventually I tracked down this cute little bookmarklet:

javascript:if (window.document.body.outerHTML != undefined) {''+window.document.body.outerHTML+''} else if  (document.getElementsByTagName('html')[0].innerHTML != undefined) {''+document.getElementsByTagName('html')[0].innerHTML+''} else if  (window.document.documentElement.outerHTML != undefined) {''+window.document.documentElement.outerHTML+''} else {alert('Your browser does not support this functionality') };

Just copy it all into one line (remove the linefeeds, they’re just there for readability) and put it as the URL of a bookmark. Then whenever you want to see the real source of a page, it’s just a click away.

(I wish I could remember where I found this little gem, but from a quick search it looks like it’s been floating around for a while…)

]]>
Magnetic Wall Chessboard https://www.docbug.com/blog/archives/781 Thu, 04 Sep 2008 06:36:51 +0000 https://www.docbug.com/blog/archives/781

The latest addition to our magnetic wall: a wall-mounted magnetic chessboard. Basically we took a cheap chessboard, glued some rare-earth magnets into the bases of the plastic pieces, and glued some magnetic backing onto the board itself. To the side is a little magnetic label with one side printed "White to move" and the other printed "Black to move." Just make a move and flip the label over for the next person to move.

]]>
magentic-wall-chessboard-small.jpg

The latest addition to our magnetic wall: a wall-mounted magnetic chessboard. Basically we took a cheap chessboard, glued some rare-earth magnets into the bases of the plastic pieces, and glued some magnetic backing onto the board itself. To the side is a little magnetic label with one side printed “White to move” and the other printed “Black to move.” Just make a move and flip the label over for the next person to move.

]]>
Magnetic wall https://www.docbug.com/blog/archives/779 Mon, 21 Jul 2008 08:58:43 +0000 https://www.docbug.com/blog/archives/779 This weekend’s project was to paint the dining room wall and bedroom doors with magnetic paint (paint with an iron-dust mix-in). Actually, this was my wife's project while I fixed the bathroom sink — but that project was much less interesting to blog about. The dining room is shaping up to hold all the various birth & wedding announcements, plus magnetic poetry and probably some random wall games. The bedroom doors will be more personal expressions, and right now the guest room has tourist magnets from everyone who’s visited. Best of all, it's a great excuse for another order from our favorite magnet source!

magnetic-primer.jpg magnetic-primer.jpg poetry-wall-thumb.jpg
Magnetic Primer The start of our
downstairs postboard...
...and poetry wall
magnetic-primer.jpg daughters-door-thumb.jpg our-door.jpg
Guest room door Our daughter's
(*PINK*) door
Our bedroom door
]]>
This weekend’s project was to paint the dining room wall and bedroom doors with magnetic paint (paint with an iron-dust mix-in). Actually, this was my wife’s project while I fixed the bathroom sink — but that project was much less interesting to blog about. The dining room is shaping up to hold all the various birth & wedding announcements, plus magnetic poetry and probably some random wall games. The bedroom doors will be more personal expressions, and right now the guest room has tourist magnets from everyone who’s visited. Best of all, it’s a great excuse for another order from our favorite magnet source!

magnetic-primer.jpg magnetic-primer.jpg poetry-wall-thumb.jpg
Magnetic Primer The start of our
downstairs postboard…
…and poetry wall
magnetic-primer.jpg daughters-door-thumb.jpg our-door.jpg
Guest room door Our daughter’s
(*PINK*) door
Our bedroom door
]]>
iPhone fix: blow out the lint https://www.docbug.com/blog/archives/771 Mon, 04 Feb 2008 06:02:40 +0000 https://www.docbug.com/blog/archives/771 Here's a simple iPhone fix that others may appreciate. A few weeks ago my microphone started to cut out — I could listen to music over the headphones, but with both pairs of earbuds the microphone would cut out, and disconnecting and reconnecting them would cause the call to drop. I finally took it to the Genius Bar today and they immediately took out an otoscope and discovered that the hole where the headphone jack fits in was filled with pocket lint! One quick burst of compressed air later and it was working perfectly again! (Apparently they get this problem a lot, as they've got a special mini-jack attachment for their compressed air can.)

A nice side effect was he noticed the screen's hairline crack I'd gotten when the phone fell out of my pocket. From all I'd read on the Net I thought I'd have to pay $250 to have that repaired, but he said so long as it was just a single hairline crack and there was no damage to the case itself they could do a warranty replacement — five minutes later I was walking out of the store with a fresh-out-of-the-box iPhone.

]]>
Here’s a simple iPhone fix that others may appreciate. A few weeks ago my microphone started to cut out — I could listen to music over the headphones, but with both pairs of earbuds the microphone would cut out, and disconnecting and reconnecting them would cause the call to drop. I finally took it to the Genius Bar today and they immediately took out an otoscope and discovered that the hole where the headphone jack fits in was filled with pocket lint! One quick burst of compressed air later and it was working perfectly again! (Apparently they get this problem a lot, as they’ve got a special mini-jack attachment for their compressed air can.)

A nice side effect was he noticed the screen’s hairline crack I’d gotten when the phone fell out of my pocket. From all I’d read on the Net I thought I’d have to pay $250 to have that repaired, but he said so long as it was just a single hairline crack and there was no damage to the case itself they could do a warranty replacement — five minutes later I was walking out of the store with a fresh-out-of-the-box iPhone.

]]>
“We didn’t start the bubble” https://www.docbug.com/blog/archives/767 Thu, 06 Dec 2007 23:24:31 +0000 https://www.docbug.com/blog/archives/767 I'm probably biased living here in Silicon Valley, but this Here Comes Another Bubble by The Richter Scales is brilliant!

(Thanks to Nat for the link!)

]]>
I’m probably biased living here in Silicon Valley, but this Here Comes Another Bubble by The Richter Scales is brilliant!

(Thanks to Nat for the link!)

]]>
Installing emacs23 with X11 support on Leopard https://www.docbug.com/blog/archives/765 Tue, 20 Nov 2007 05:33:20 +0000 https://www.docbug.com/blog/archives/765 For some reason Fink has not yet updated their version of GNU emacs. While there are several other options, including Aquamacs, xemacs from Fink and the terminal-only emacs that comes pre-installed on OSX, I missed my traditional GNU Emacs running over X11. Luckily, with a few tweaks to this guide, the process was pretty painless — assuming you've already got Fink installed, just do the following (all from the Terminal):

 mkdir tmp cd tmp cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co emacs cd emacs fink install libungif libjpeg libtiff export LIBS="-lresolv" ./configure --without-carbon --with-x --prefix=/usr/local make bootstrap make sudo make install cd /usr/local/bin/ sudo ln -s emacs emacs23 
]]>
For some reason Fink has not yet updated their version of GNU emacs. While there are several other options, including Aquamacs, xemacs from Fink and the terminal-only emacs that comes pre-installed on OSX, I missed my traditional GNU Emacs running over X11. Luckily, with a few tweaks to this guide, the process was pretty painless — assuming you’ve already got Fink installed, just do the following (all from the Terminal):

 mkdir tmp
 cd tmp
 cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co emacs
 cd emacs
 fink install libungif libjpeg libtiff
 export LIBS="-lresolv"
 ./configure --without-carbon --with-x --prefix=/usr/local
 make bootstrap
 make
 sudo make install 
 cd /usr/local/bin/
 sudo ln -s emacs emacs23
]]>