Snippet: How to convert GPS NMEA text files to kml and csv format.
Trying out a new category: Snippets These will be tiny shell scripts or pieces of code. The first one is how to have linux convert GPS NMEA text files to kml format. #!/bin/sh gpsbabel -i NMEA -f $1...
View ArticleCheat Sheet for LibreOffice Basic
I created a LibreOffice cheat sheet to help me quickly learn and recall the syntax. It covers some very useful things: Getting the Sheet Getting A Cell Iterate over a range of cells: Getting Form...
View ArticleSnippet: Poster Printing
I always forget how to make a poster using ghostscript. the command is ‘poster’ sample usage: poster -v -mletter -c5% -s1 input.ps -o output.ps This will enlarge the original and put crop marks on the...
View ArticleSnippet: Map a value from one range to another using bc command line linux...
mapping in the bc calculator taken from Arduino bc -l An arbitrary precision calculator language define map(x,in_min,in_max,out_min,out_max) { (x-in_min)*(out_max-out_min)/(in_max-in_min)+out_min }...
View ArticleCorrective Lenses for the Raspberry Pi Camera Module
I am currently working on a project involving QR codes and a Raspberry Pi. I have QR codes printed on business card size media. When the card is far enough away for the camera to see the whole code it...
View ArticleSnippet: Modifying Arduino Preferences To Be Stored In The Application Directory
Some times I like to have different versions of the Arduino IDE installed. I would also like them not to use the same preferences file and Sketchbook directory. In the lib/preferences.txt file is...
View ArticleUsing ‘bc’ to convert numberic bases
bc – An arbitrary precision calculator language Here is how to use bc to convert from one base to another. bc -l ibase=2;obase=A;1010001 81 Here the obase = A is in hex for 10.
View ArticleArduino Decoding An Absolute Position Rotary Encoder
I was working on a program and needed the user to be able to select from over 12 choices of pre-recorded patters. I chose to use a absolute position rotary encoder that had 16 detents. The particular...
View ArticlePolar to Cartesian and Back Again Snippets
PHP: $p2c=polartoCartesian(36.8699,5); echo "p2c: angle=36.8699 distance=5 [$p2c[0]] [$p2c[1]]\n"; $c2p=cartesiantoPolar(4,3); echo "c2p: x=4 y=3 [$c2p[0]] [$c2p[1]]\n"; function...
View ArticleFonts with vertically stacked Unicode vulgar fractions.
For what the heck im talking about see Number Forms Note that most glyphs portray these as 1/2 where the numbers sit to the left and right of the fraction slash. However some fonts have what are called...
View Article