Archive for the ‘interesting’ Category

Google Docs as a Free and Easy CMS

Monday, May 18th, 2009

CMS

A CMS is a content management system. Basically, it holds all the revisions, deals with collaborators, and puts stuff into templates so it’s nice on the eye. Good CMS’s will allow you to edit WYSIWYG too. It is, however, a pain for me to go to the work of setting up Joomla, Pligg, or WordPress for something quick and simple. And I hate to pay for software. What do you do when nothing fits just right? Invent your own system.

Google Documents

When you think of the things a CMS can do, Google Docs immediately comes to mind. Revisions, collaboration, WYSIWYG editing, and even basic publishing. The “publishing” feature only give a black and white page with not much wiggle room to turn it into a real site, although. Then I had my idea. What if PHP was to grab the published document’s URL and extricate the content, and then echo it back as if the content was hard-coded in? Some thinking, a soda, and ten lines of PHP, it was done. The script retrieves the page and discards anything before the content and everything after it. This however, removes some of the styles Google Docs puts in. If you edit the raw html of the document as Google kindly allows, you can add tags that you can refer to in your own linked stylesheet. The Google Doc must be published to work.The script is as follows, and if free to use with the comments in place:

< ?php
$docID = "dfgpnkdc_37fn6v5tfh";
//published google docID (part of publish url)
$temp = file_get_contents("http://docs.google.com/View?docID=" . $docID);
//get the page contents of the "preview" url for the doc
$temp2 = explode('<div id="doc-contents">', $temp);
//separate into the upper non-text half and lower half
$temp3 = $temp2[1];
//discard upper half
$temp4 = explode(’<br clear=”all”/>’, $temp3);
//separate into all-text and non-text, again  

//don't remove this line:
echo "<!-- Google Docs CMS PHP script copyright 2009 theajblog.com, begin script generated text -->";

echo iconv ( "utf-8" , "ISO-8859-1//TRANSLIT" , $temp4[0] );
/* echo text converted utf-8 to iso-8859-1 - important. Apostrophes turn into A’s with tildes because of a character mismatch otherwise. Also, without //TRANSLIT, certain characters like a special closing quote will cause it to cut off the document there. */
?>

The Tangible Countdown Timer

Wednesday, March 18th, 2009
An application I created to control a USB7 from a computer's serial port.

An application I created to control a USB7 from a computer's serial port.

The USB7

Quite a while ago, I discovered the USB7. It wasn’t until recently I actually thought I would have a use for it if I were to buy it. I was working on a website project due at midnight on a particular day. I was thinking how awesome it would be if I could have a bunch of LED 7-segment displays counting down the days, then hours, then minutes, then seconds, and finally hundredths of seconds. That was when I remembered it, the USB7. The USB7 is a relatively inexpensive, usb-controlled kit with six 7-segment displays. I haven’t seen many popular projects for it, though, so what does one do when there’s a need for something but it doesn’t exist? You make it! I bought a kit online, so it’ll arrive sometime later.

The Programming

Turning to Visual Studio Express 2008 and my brain’s Visual Basic abilities, I created this super-simple application that continually updates the display with the time remaining, fitting as much data as possible. For example, it can show up to 99 days, 24 hours, and 60 minutes when there’s more than 24 hours left. When there’s less than that, but still more than an hour, it’ll display a 2-digit hour code, a 2-digit minute number, and a 2-digit second number. Once you’re down to minutes, it shows minutes, seconds, and hundredths of seconds. Down to seconds, it’ll drop the minutes. Finally, once the timer’s up, it plays a crazy alarm sound and flashes constant zeroes all across the display. Now just to wait until it arrives!

Toner Transfer Is No Fun

Friday, March 6th, 2009
A plain copper board toner transferred, touched up with marker and labeled.

A plain copper board toner transferred, touched up with marker and labeled.

Toner Transfer

As part of the process for home printed circuit board etching, you need to somehow get a resist where you want there to be copper. After the transfer, you can then apply any of many different etching chemicals which then dissolve the unprotected metal. In my opinion, this step, good toner transfer, is the hardest and biggest roadblock to anyone trying to make a quick board. The concept is relatively simple, iron a laser printed piece of paper onto the copper, fusing the plastic toner to the copper. Commercial products are sold that achieve this much easier, but who wants to have to spend money, pay shipping, then wait for it to arrive? So, trying as many different tutorials I could find on the Internet, I set out to meld plastic to metal. I used a cheap old LaserJet 5P for this purpose, and printed a schematic out on magazine paper first. I ironed it on, and it partially held, as visible in the lower left corner of the photo. I then used Office Depot Presentation Paper to try and get a better stick. It was a bit better, as seen in the upper right. I also tried different combinations of scrubbing preparations and such on the back. None fully worked. I got a bubble tank ready, a bubbler, all the chemicals, and even a glove box, and the only conclusion I can come to is this: toner transfer is no fun!

The Bosun’s Lawn Chair - Hoisting Yourself Into a Tree

Wednesday, March 4th, 2009
The chair, rigged and ready for a tree and pulley.

The chair, rigged and ready for a tree and pulley.

What??

A bosun’s chair is a type of seat often used when someone has to be lifted up somewhere, like a high up mast on a boat. What I made is also effectively a bosun’s chair. It’s effectively a lawn chair turned bosun’s. Using climbing rope, some thinner rope, a bunch of webbing, 3 carabiners, a metal chair, and a ~$15 oscillante pulley from EMS, I managed to develop a device enabling you to hoist yourself into a tree. I specifically like my version because of the suspended lawn chair effect. It’s hard work, lifting your own weight, due to there only being the one pulley. I have to add more knots to actually make it practical too. But it sure was fun, dangling in the air, sitting in a chair (rhyme unintentional).

Warning

Test your chair with 1.5x your weight in sandbags before sitting in it. I am not responsible for any damage or injury caused by performing anything in this article. I wore a ski helmet/goggles for extra protection/coolness factor.

Setting it Up

First of all, you need to rig the chair. Using a knot who’s name I can’t remember, the one that tightens with force like all good knots and has a loop, get it so that each leg is on the rope. Tie them all together. You should now be able to lift the chair with one hand, holding it by the long rope extending upwards. Then, make a kind of seat belt with some different rope, tied to one end of the chair with loops to hook into a carabiner on the other side. To finish it off, tie a separate piece of rope to the main one closest to the chair, so it can be carabiner’d to a loop on the other side of the pulley to lock you in place. Then, get the pulley into the tree. The particular one I used I believe had a safe working load of ~2 kn (~500 lbs.) and a breaking load of 16 kn (~4 tons). I’d only be putting 200-something pounds up so that wasn’t a problem. Using the webbing, get the pulley on a carabiner on to an extending branch. Loop the rope through, then make lots of loop knots to climb up and clip into. There you have it! Hoist yourself up, enjoy the view, and don’t fall down.

Review - Creative Xmod

Monday, March 2nd, 2009
Creative Xmod - poor lighting, extremely grainy. Sorry...

Creative Xmod - poor lighting, extremely grainy. Sorry...

The Xmod

This is yet another great example of a device with no proof if it works other than to try it. The Xmod is a USB sound card from Creative, which has two sound “restoration” features: the Crystallizer and CMSS-3D. The Crystallizer, in the marketing department’s words, “intelligently restores the highs and lows for rich, crystal clear music playback.” I didn’t believe it. Nor did I believe that it “features smart technology that turns your plain stereo sound into rich virtual surround sound by centering vocals and moving ambient sounds all around you.” Whatever. The real reason I bought it was because the internal microphone jack had a weird hum I couldn’t get rid of. Also, I could get it for $25, $55 dollars off, direct.

Microphone Sound

It worked great with my lavaliere and unidirectional microphone. No hum! Already worth it. The Crystallizer and 3D effects thankfully do not apply here.

Headphone Sound

The Xmod comes with a dandy pair of earbuds which I immediately started using over my iPod ones. They’re better and don’t hurt my ears, fit-wise. They do look quite a bit like the iPod ones, also. With the Xmod, however, they make a killer combination. While Crystallizer and 3D can make some things sound really distorted, they can be disabled independently with two switches. Most music will sound great with it, though, and you’ll want to know how to increase the intensity. By tapping the whole upper plastic section twice, with the LEDs, you can control the Crystallizer intensity with the built-in volume knob. Tap again to change the 3D setting. It will then either time out or you can tap again to get out of the adjustment mode.

Other Things Worth Noting

The Xmod requires USB power to run, so, independent from a USB port it’s useless. Get around this with either a mini-USB AC adapter, or something similar to a MintyBoost. It works as a USB sound card, but, should you wish to use an iPod or other non-USB-sound-card-compliant device, connect the headphone jack on your device to the line-in on the Xmod. Like I already said, you still need power though. The volume knob works via USB, so it won’t work without a computer. That said, this device is a wonderful addition to anybody’s toolbox!

Using a Hacked Best Buy Gift Card as a Free Amplifier!

Thursday, February 26th, 2009
My iPod goes to the amplifier, then is transmitted through a radio.

My iPod goes to the amplifier, then is transmitted through a radio.

What’s Happening?

So, the way it’s working in the photograph is that music is going from my iPod, to the hacked amplifier, to the handsfree jack, which then transmits on FRS/GMRS frequencies. It can be heard with another two-way radio. Now, you may be thinking, “Why’d you just re-invent the FM transmitter!” Well, this doesn’t transmit on any traditional FM/AM radio frequencies. By utilizing two-way radios for communication, other people with radios you’re already using can hear! Or, play really weird music and annoy them! I prefer the latter.

How is This Done?

The particular gift card was the one that Best Buy sells, which features an iPod speaker on the back. The card comes off easily, with some clips. Take a bunch of screws out, and you expose the circuit board. All I did was desolder the speaker leads and solder on a mini-audio jack, like the ones found on cellphones and handsfree systems. I soldered the positive speaker lead to the microphone section, as visible from pinouts.ru, and then soldered the negative lead to ground. Holding down “talk” with everything on blares music on the selected channel. A tad quiet and finicky, but better than without amplification. Awesome!

<$10 3D "Slow Prototyping"

Tuesday, February 24th, 2009
Salt Dough Landforms

Salt Dough Landforms

Who Needs CAD?

Who does need CAD for simple projects? Who can afford those things? Answer is not many beginning hobbyists. Especially when you’ve got the power of one of the best tangible prototyping interfaces on your hands available today! It is…salt dough!

What’s Salt Dough?

Salt dough is an edible but nasty-tasting dough usable for all sorts of applications. For example, in the case seen above, you can prototype imaginary land forms. It dries in a matter of hours for small pieces, and a matter of a couple days for thicker things. It’s simple, and can be made with off-the-shelf kitchen supplies easily. Just form it into whatever you wish to make it look like, be it anything from a project enclosure to a prototype of a new type of jewelry. Let it dry on a cookie sheet. When it’s done, you could vacuum form it into something usable, carefully hollow it out and make something, or just let it be as is. Choosing the last step, you can proceed to painting. Most general purpose paints should work, probably not oil paints or whatever. Let it dry. Finally, if you really feel it needs a protective coat, dunk it into a little puddle of Elmer’s glue and put it onto a piece of paper or something. After about 10 minute, take a brush and even out the coat, making sure it doesn’t collect into low parts. The best quick, cheap, “slow prototyping” method!

Recipe

Quite simple, here it is:

- 1 cup of salt
- 2 cups of flour
- 3/4 to 1 cup of lukewarm water, depending on humidity. Trial and error.

Add the salt to the flour in a bowl and mix with your hands. Just try not to get it into cuts, as it stings from the salt. Add water until the whole mixture is mixed up. Knead on something easy to clean. Can be stored for about a month in a sealed container. Then it starts to rot and get stinky. Not wanted. Throw away upon rotting, please.

The Partly and Prototypically Built Stabilizer

Sunday, February 22nd, 2009
"Project SteaDIY"

"Project SteaDIY"

Yay!

I actually had some time and got around to building the Merlin clone. I think I might nickname the project “Project SteaDIY”. My first and foremost problem was the pipe I had ordered. I had had no idea what wall size to order, so I just went with 1/8″. Big mistake. That stuff is like, the type goons carry around to whack people with. Not the kind I can bend in a wooden form. So, I downgraded. Going out to the local hardware store, for about $2 I purchased somthing like 8 feet of thin wall steel conduit. It’s steel, so it’s heavier. But it was bendable. I used a 4.5 inch radius plywood form to bend the semicircle, with a lever type mechanism as described here. It worked, with no kinks either! I crimped something like the last 2 inches in a vice, making it flat.

Attaching Everything

Although I certainly did goof quite a bit when it came to the drilling measurements, resulting in off holes, it all worked out in the end. At Wal-Mart I found some Stanley Line Levels which, after beating into submission, I was able to bolt on. I had the balance bolts ready for a while, also making it easy to bolt. As for the handle, I don’t have anything special that works yet. I tried a kind of gimbal that I had made, more a piece of art than anything else, which broke under the strain of the rig. So, sacrificing stability for simplicity, I merely chopped up something that would work for a handle and bolted it on too. I really need to get a better handle-rig mount that will allow more handle jiggles and less footage jiggles.

The Price?

Amazingly, I think it was under $50 for everything. The most expensive was the plate, which was special order 6061 alloy 1/8″ aluminum, at about $10 including shipping or something like that. This is, of course, not including a camera.

The Synopsis?

I’m not done yet. On my to-do list: better weight balancing, and a better handle mount. The rest works fine, all good.

Sudden Breakthrough!

Monday, February 16th, 2009

Not Exactly Pertinent...

Not Exactly Pertinent...

Image Copyright Protection!
I was thinking about this, and I don’t know why, but it struck me. It occurred to me what the best method of preserving an images quality while protecting against hotlinking and copyright abuse with minimal effort. So, the next morning, I wrote up all the code necessary to make it work. Now, I’m not actually going to describe the entire process, but instead leave it up to everyone to reverse engineer and figure it out! There should be enough there for anyone with basic HTML and CSS knowledge. The example is available here. Enjoy!

Amazon Mechanical Turk

Monday, February 16th, 2009
A Mechanical Turk Visualization

A Mechanical Turk Visualization

What? Mechanical Turkey?

 

No, it’s Mechanical Turk. Yet again, I’ve got too much spare time. Yet again, I keep feeling I should do something productive will all this time. Yet again, I had no idea. Then, I remembered about Turk. Amazon, yes, the same people at amazon.com, quite a while ago launched something called “Mechanical Turk” and they describe it as a “Marketplace for Work,” which it is. People, referred to as Requesters, set up HITs (Human Intelligence Tasks) with a monetary reward. Upon a Worker submitting the HIT, the Requester can approve or reject their work. Once approved, the Worker receives payment.

Sweet! Monetary Value!

Yes, this may seem like the greatest thing to come to the world since sliced bread (July 7th, 1928). In some ways, it could be. Unfortunately, unlike most real jobs, the pay is horrible. Majority of the HITs are in the $0-$.20 range. The tasks that are higher paying are correspondingly harder, such as audio transcription or product guide writing. For example, you might get paid $1.30 for an average graded transcript of a 5 minute slice of audio. Say that it takes you 10 seconds for every second of audio, plus a bit more, like me, and then extrapolate the percentage of minimum wage it is. Roughly $1.30/hour. Minimum US wage is $7.15. That means that you are getting 18% of what a extra-low-end job would be. I guess it’s the sacrifice of convenience.

Um, How Do I Get My Reward?

Once in your Turk account, you can withdraw through one of two ways: to a checking account, or an Amazon gift certificate. A minimum of a $10 checking account transfer is required, and only a $1 minimum on the certificate. I guess it’s better than doing nothing, but the work can be tedious.