| Unwanted and Unzipped | 8:17 PM, Mar 31 2010 |
|
Have you ever unzipped a file into you current directory and have it splatter files everywhere? I've done this so often that I wrote a little app. to remove then all again. Read More |
|
| Making a Site Map with Graphviz and wget | 2:11 PM, Mar 14 2010 |
|
I needed to make a site map, before tools were readily available in the web. Combining this script with wget to get a static version of the site makes a primitive site map. It's not perfect and needs a rewrite using Python to correctly map links. To get a static version of a site: wget --recursive --page-requisites --html-extension --convert-links www.your-site.co Then cd to the new directory and run maketree to get a image file, sitemap.png. Look at it. I'm sure there a better tools 'out there' these days. Perhaps I'll improve it one day. |
|
| Produce manucturing files from Eagle | 1:15 PM, Mar 14 2010 |
|
This is a bash script to produce all the nessessary files for manufacuring a PCB from an Eagle layout. This script is for version 4.x and 5.x of Eagle. The output files are as specified for manufacture by Olimex. Yours may vary. Change the first EAGLE=/PATH to wherever your Eagle install is. I could have used "whereis" but I have two versions installed and needed hard coded paths of each. If it doesn't work for you, modify it so that it does. If it does work for you then send me a thankyou note. Read More |
|
| Decimal to Fraction | 12:58 PM, Mar 14 2010 |
|
A Python script to convert a decimal fraction like 0.125 to a regular fraction like 1/8. Why you ask? I wrote this as an aid to programming a microcontroller, in this case a 68HC11. I needed to derive temperature from a thermister sensor using a formula like: t = 1.234x + 12 Normally in order to multiply x by 1.234 the floating point library needs to be #included however, this increases the code size substantially. A solution is to use integers that can be manipulated without floating points and that fit into 8 bits. Since accuracy is an issue I had to decide what are the permissable errors, so the script gives errors too. If the errors are within acceptable limits this method works fine and keeps the code small. More modern controllers, like the Atmel128, have much larger memories built in so including the floating point libraries is not so much of an issue, for the smaller chips though it's still useful. Read More |
|