Sunday, May 24 2009, 23:09
72 Stunden Countdown für #Zensursula - ePetition
By fake - Permalink
the following blog post is german, because once again it covers a german politics topic. please ask me to translate it by commenting or use the google translator if you need to know ;-)
am mittwoch findet vormittags eine oeffentliche anhoerung zu den internet-sperren statt.
ziel der aktion von netzpolitik.org ist es, bis dahin die 100.000er-grenze bei den mitzeichnern als argumentationsgrundlage und deutliches signal mindestens zu knacken. daher moechte ich euch auch ermutigen, noch einmal alle leute in eurem bekanntenkreis zu nerven, ob sie schon mitgezeichnet haben, und die thematik gegebenenfalls zu erklaeren, damit sie sich eine meinung bilden koennen.
es gibt da ein nettes video von c't-tv, das ich schamlos von brians blog entwendet habe, und die thematik sehr fein zusammenfasst.
Sunday, May 10 2009, 19:13
one-liner for changing file endings
By fake - Permalink
i have not been blogging for quite some time, i noticed when replacing the blog software; so now i keep constantly thinking about what i may blog, so a little more density in the posts evolves ;-)
here's today's note; i just needed it and figured someone might say "aaw! that's useful" - a one-liner to use in bash for changing the extension of given files in a directory. bash is the shell that is by default installed in mac os x, and opens when you start the "Terminal" application. It is also the default in almost all linux distributions.
in this example, i rename all .mp4 files to .m4v (thanks, ps3...). adapt as needed.
here's today's note; i just needed it and figured someone might say "aaw! that's useful" - a one-liner to use in bash for changing the extension of given files in a directory. bash is the shell that is by default installed in mac os x, and opens when you start the "Terminal" application. It is also the default in almost all linux distributions.
in this example, i rename all .mp4 files to .m4v (thanks, ps3...). adapt as needed.
for i in *.mp4 ; do mv "$i" "${i%%mp4}m4v" ; done
the %% operator strips the string following it from the end of the variable's content. the ## operator does the same, but at the beginning of the string.Wednesday, May 6 2009, 21:53
Graphing Desktop Backgrounds
By fake - Permalink
Math, me bored, wildly typing whatever the guy upfront is talking about into Grapher.app, and oh, look, my new desktop background ;-)
the formula is sin^2(x), scaled up and down a bit.
PNG Bitmap Version | PDF Vector Graphic
got any better stuff i can still understand the math behind? ;-)
the formula is sin^2(x), scaled up and down a bit.
PNG Bitmap Version | PDF Vector Graphic
got any better stuff i can still understand the math behind? ;-)
Thursday, November 20 2008, 21:22
GPIO to I2C on a Soekris net4801
By fake - Permalink
I recently started playing around with robots from arexx - a friend introduced me to the asuro, and - impressed by the steep learning curve - i got myself an RP6.
having toyed around with it, i remembered i had an old soekris net4801 lying around... which, unfortunately, does not have i2c ports pinned out - but it has 12 GPIO pins ... i quickly found i2c-gpio in the linux kernel, but that uses the arch-independent gpio layer called gpiolib. the soekris pc8736x gpio driver does not support this layer :(
i'm by far not a kernel developer, but i managed to insert a small wrapping layer that seems to work. it basically registers the pc8736x as generic gpio chip, additionally to the character device(s).
i repeat: i am not a kernel developer. this is a hack so ugly it will most likely not work for you. if you have a soekris net4801 (no, a net4501 will not work! it has lesser gpio pins! go count!) your chances are indefinitely higher it may work, but i don't guarantee anything. also, even the most basic cleanup code is missing - i am not removing the gpio chip on unload, i just dont' care for now.
included in the patch below is a i2c-gpio-generic module i found in the openwrt subversion by pure coincidence, it works very well. i just patched it so it hardcodes sda and scl to open drain, which is the default on the soekris.
to get i2c up and running on the gpio pins 0 and 1 (jp5 pins 3 and 4 on the connector!) with 0 being sda and 1 being scl, you have to
a little warning: i wouldn't mess around with the character device while using this, especially not for the pins in use for i2c. you have been warned.
i also wrote a small test program that reads out the current light sensor value (left) of the rp6 running the IC2_Slave example program that it has been shipped with.
also, the *actual* pinout-to-minor-device-nr for the gpio character device might be of interest here:
kudos to the guy who found this out, it cost me 2 days to figure out the straightforward approach (GPIO 20 = minor 20?) was wrong.
here is the patch. handle with care. it's against linux-2.6.27.6. i used this .config to build the kernel.
having toyed around with it, i remembered i had an old soekris net4801 lying around... which, unfortunately, does not have i2c ports pinned out - but it has 12 GPIO pins ... i quickly found i2c-gpio in the linux kernel, but that uses the arch-independent gpio layer called gpiolib. the soekris pc8736x gpio driver does not support this layer :(
i'm by far not a kernel developer, but i managed to insert a small wrapping layer that seems to work. it basically registers the pc8736x as generic gpio chip, additionally to the character device(s).
i repeat: i am not a kernel developer. this is a hack so ugly it will most likely not work for you. if you have a soekris net4801 (no, a net4501 will not work! it has lesser gpio pins! go count!) your chances are indefinitely higher it may work, but i don't guarantee anything. also, even the most basic cleanup code is missing - i am not removing the gpio chip on unload, i just dont' care for now.
included in the patch below is a i2c-gpio-generic module i found in the openwrt subversion by pure coincidence, it works very well. i just patched it so it hardcodes sda and scl to open drain, which is the default on the soekris.
to get i2c up and running on the gpio pins 0 and 1 (jp5 pins 3 and 4 on the connector!) with 0 being sda and 1 being scl, you have to
- modprobe pc8736x_gpio
- read dmesg and note the assigned lowest pin nr (244 for me)
- modprobe i2c-generic-custom bus0=245,244,245 (the latter two being the number from above 1st, and 1 added to it 2nd. the first nr. is the i2c bus id. choose it to your liking.)
- modprobe i2c-dev
a little warning: i wouldn't mess around with the character device while using this, especially not for the pins in use for i2c. you have been warned.
i also wrote a small test program that reads out the current light sensor value (left) of the rp6 running the IC2_Slave example program that it has been shipped with.
also, the *actual* pinout-to-minor-device-nr for the gpio character device might be of interest here:
| Soekris | PC8736x | Minor Device # |
|---|---|---|
| GPIO 0 | GPIO 20, 117 | 16 |
| GPIO 1 | GPIO 21, 118 | 17 |
| GPIO 2 | GPIO 22, 119 | 18 |
| GPIO 3 | GPIO 23, 120 | 19 |
| GPIO 4 | GPIO 24, 121 | 20 |
| GPIO 5 | GPIO 24, 122 | 21 |
| GPIO 6 | GPIO 26, 123 | 22 |
| GPIO 7 | GPIO 26, 124 | 23 |
| GPIO 8 | GPIO 4, 6 | 4 |
| GPIO 9 | GPIO 5, 7 | 5 |
| GPIO 10 | GPIO 13, 55 | 11 |
| GPIO 11 | GPIO 12, 54 | 10 |
kudos to the guy who found this out, it cost me 2 days to figure out the straightforward approach (GPIO 20 = minor 20?) was wrong.
here is the patch. handle with care. it's against linux-2.6.27.6. i used this .config to build the kernel.
Sunday, November 9 2008, 14:04
exportPB4Fritz updated
By fake - Permalink
i just updated the exportPB4Fritz.py skript so it can handle contacts that do not have a first, but a lastname set.
a minor fix, of course, just thought i'd quickly replace the version from the original posting so people not into python can use it with "interesting" os x address books ;-)
the download url is the same, it's in the blog post linked above.
« previous entries - page 2 of 12 - next entries »

