|
maZZoo's blog very low frequency tech postings - code |
|||
home blog feed eyes info code [12] dect [4] hard [8] meta [5] security [5] jul 2009 (1) jun 2009 (1) jan 2009 (2) dec 2008 (1) oct 2008 (1) jan 2008 (1) oct 2007 (1) jun 2007 (1) feb 2007 (3) jan 2007 (3) nov 2006 (2) aug 2006 (2) jul 2006 (1) may 2006 (1) nov 2005 (2) oct 2005 (1) apr 2005 (2) mar 2005 (2) feb 2005 (1) jan 2005 (1) may 2004 (1) jan 2004 (1) apr 2003 (1) jan 2003 (1) |
Tue, 30 Jun 2009 NoWhere - yet another geocaching appilcation for mobile phones DDD° MM.MMM', DDD° MM.MMM' N 48° 12.345', E 12° 34.567'whereas TomTom only shows coordinates in this style: DDD.DDDDD°, DDD.DDDDD° N 48.20575°, E 12.57612now for a normal geocache this is no problem - you calculate your destination coordinates at home and enter them in the format the device likes. But for a multicache it becomes nasty, you only discover coordinates for the next hint on the way, and have to calculate them en route. Sitting with a calculator or the calculator SW in your mobile phone takes much of the fun of geocaching. For some month I use a Nokia E71 - it was recommended to me, and I like it - the type of bugs and crashes is different, but its a revelation alone not to see random windows error message popups. Mobile SW still has a long way to go. But the Nokia E71 is not any better, GPS wise. The shipped Nokia GPS application only shows coordinates in the same format as TomTom: DDD.DDDDD°, DDD.DDDDD° N 48.20575°, E 12.57612°So I started looking for a simple geocaching SW that met my requirements: - runs on one of my 2 devices - royalityfree - coordinates displayed in the geocaching style DDD° MM.MMM', DDD° MM.MMM' - works offline (I don't have a flatrate nor am I expecting every cache to have 2G/3G coverage, also I am unwilling to pay) - opensource would be nice but is no mustI looked at like 10 different "solutions" which all failed for me. So I did something very unusual - and hopefully unique - I wrote a JAVA(tm) program: It's very minimalistic, and has all features you need for a successfull sunday multi-cache.
you can download it here: - NoWhere.jar - NoWhere.jad - sourcecode: git clone anongit@mazzoo.de:/git/NoWhere.git password: git-pub For building I used the Sun Java Wireless Toolkit for CLDC Update: obviously I couldn't have gone through all the pain of java without the help of a friend - thanks Simon! posted in /code | link | comments [1] Tue, 05 Jun 2007 there's more to the picture than meets the eye
theres more to some open-source authors than others want. posted in /code | link | comments [0] Wed, 24 May 2006 rndpic Thu, 10 Nov 2005 /* * bluestep - locks your screen once you step out of the room, * provided that you took your bluetooth enabled * mobile phone with you. * * version 0.01 * * usage: bluestep <bdaddr> * * bdaddr - MAC address of the remote bluetooth device * * * (c) 2005 by Matthias Wenzel, licensed under GPLv2 * */ this tiny daemon peridically pings your bluetooth mobile, if doesn't get responses for a while it will lock your X desktop with "xscreensaver-command -lock". hints: figure out your <bdaddr> with:
# hciconfig hci0 up
# hcitool scan
Scanning ...
00:11:22:33:44:55 my_left_foot
#
try to ping your device (hciconfig/hcitool/l2ping come with your bluetooth libraries and tools):
# l2ping -c 3 00:11:22:33:44:55 Ping: 00:11:22:33:44:55 from 00:55:44:33:22:11 (data size 44) ... 0 bytes from 00:11:22:33:44:55 id 0 time 27.52ms 0 bytes from 00:11:22:33:44:55 id 1 time 32.05ms 0 bytes from 00:11:22:33:44:55 id 2 time 47.04ms 3 sent, 3 received, 0% loss
if the above command works you're probably set to run bluestep! Mon, 03 Oct 2005 fbskate - bouncing jpegs on framebuffer devices BUGS: I don't do propper /dev/fb0 handling, just enough to run on my 32 bit framebuffer devices. Virtual resolutions are probably unsupported. I don't do propper JPEG decoding. BW images and somewhat rare color mappings won't work.
Wed, 13 Apr 2005 Tendrils level viewer - a Perl/GTK2 tutorial ![]()
Mon, 11 Apr 2005 mplscan /* * mplscan 0.1.0 * sends out MPLS packets over IPv4/GRE * packet format: [ IPa [ GRE [ MPLS [ IPb [ UDP ]]]]] * * actually i didn't test whether machines answer to this type of * packets, but rumors have it they do. i wrote this to keep my * fingers warm and get into libdnet, and i added GRE and MPLS support. * * (c) 2005 by Matthias Wenzel, mazzoo /at/ mazzoo.de * mplscan.c is licensed under GPLv2 * the two files gre.h and mpls.h are "AS IS" and may make it into libdnet * */
mplscan-0.1.0.tar.bz2
Mon, 07 Mar 2005 oldcalendar.pl $ ./oldcalendar.pl 2005 2020 100 2005 : 1994 1983 1977 1966 1955 1949 1938 1927 1921 1910 2006 : 1995 1989 1978 1967 1961 1950 1939 1933 1922 1911 2007 : 2001 1990 1979 1973 1962 1951 1945 1934 1923 1917 1906 2008 : 1980 1952 1924 2009 : 1998 1987 1981 1970 1959 1953 1942 1931 1925 1914 2010 : 1999 1993 1982 1971 1965 1954 1943 1937 1926 1915 1909 2011 : 1994 1983 1977 1966 1955 1949 1938 1927 1921 1910 2012 : 1984 1956 1928 2013 : 2002 1991 1985 1974 1963 1957 1946 1935 1929 1918 1907 2014 : 2003 1997 1986 1975 1969 1958 1947 1941 1930 1919 1913 2015 : 1998 1987 1981 1970 1959 1953 1942 1931 1925 1914 2016 : 1988 1960 1932 2017 : 1995 1989 1978 1967 1961 1950 1939 1933 1922 1911 2018 : 2001 1990 1979 1973 1962 1951 1945 1934 1923 1917 1906 2019 : 2002 1991 1985 1974 1963 1957 1946 1935 1929 1918 1907 2020 : 1992 1964 1936 1908sourcecode:
#!/usr/bin/perl -w
# oldcalendar.pl [startyear] [endyear] [recentyears]
#
# prints out the years of old calenders you could use
# in startyear (def=2005) through endyear (def=2010)
# considering calenderyears [startyear-recentyears .. startyear-1]
#
# (c) 2005 Matthias Wenzel
use strict;
sub weekday($$$){
my ($day, $month, $year) = @_;
# see
# http://www.tondering.dk/claus/cal/node3.html#SECTION00360000000000000000
my $a = int( (14 - $month) / 12 );
my $y = $year - $a;
my $m = $month + 12 * $a - 2;
my $d = ( $day + $y + int($y / 4) - int($y / 100) + int($y / 400) + 31 * int($m / 12) ) % 7;
return $d;
}
my $start = 2005;
my $end = 2010;
my $old = 50; # dump $start - $old calenderyears
$start = $ARGV[0] if $ARGV[0];
$end = $ARGV[1] if $ARGV[1];
$old = $ARGV[2] if $ARGV[2];
$end = $start if $start > $end;
my $curr=$start;
while ($curr <= $end){
print $curr . " : ";
my $o = $start - 1;
while ($o ne ($start - $old)){
if (( weekday(1,1,$curr) eq weekday(1,1,$o) ) & ( weekday(31,12,$curr) eq weekday(31,12,$o) )){
print " " . $o;
}
$o--;
}
$curr++;
print "\n";
}
Mon, 28 Feb 2005 dynamics mobile IP SNMP extension
Sat, 29 May 2004 crossgcc - ARM patch Fri, 25 Apr 2003 das clock fake 77 ![]()
Fri, 31 Jan 2003 ptrace() kernel vulnerabilities |
|||