keks/dev

To content | To menu | To search

Sunday, June 14 2009

Bye Bye Boastmachine...

...hello dotclear!

Nach massiven Spamproblemen bei boastmachine hatte ich die Nase voll und bin auf dotclear umgestiegen:

  1. ebenfalls multiblog-fähig
  2. wird noch maintained (mehe)
  3. es gibt aktuelle Themes und Plugins
  4. und hat ganz viel AJAX-Unsinn <3

Also schon einige Gründe, die echt dafür sprechen. Läuft bis jetzt auch relativ problemarm.

Friday, March 20 2009

Arch Linux Initscripts

Some days ago I was annoyed of gentoo's emerge world failing all the time and installed Arch. I am really happy with it, but there were two things that needed improvement: wireless and cryptsetup initscripts. I built them, check them out (literaly) on svn://svn.cyb0rg.org/keks/archinit. Wireless

First, copy wireless to /etc/rc.d/wireless. Then make a symlink from /etc/rc.d/wireless to /etc/rc.d/wireless.YourNetDevice, for instance: # ln -s /etc/rc.d/wireless /etc/rc.d/wireless.ath0

Then start it by

# /etc/rc.d/wireless.ath0 start

You might need to set it executable

# chmod +x /etc/rc.d/wireless

Since he execuetes dhcpcd, the script takes some time to execute. So when adding to the startup stuff, you might want to start it in background:

#/etc/rc.conf

DAEMONS=(syslog-ng @wireless.ath0 @dbus ...)

Cryptsetup Again, the gentoo-style symlink technique is used. Copy the mappings-file to /etc/rc.d/. If you want to map you device to /dev/mapper/docs, you add a symlink /etc/rc.d/mappings.docs:

# ln -s /etc/rc.d/mappings /etc/rc.d/mappings.docs

Then put the path of the device the is crypted into /etc/conf.d/mappings/docs. If you have a keyfile, put it to /etc/conf.d/mappins/docs.key, but make sure only root can read it. Don't forget to add an entry in the fstab, because the script will also attempt to mount the mapped volume. Add the mount option noauto, so he doesn't attempt to mount it on startup. Then start it by an

# /etc/rc.d/mappings.docs start

Well, that's all from me for taday, good night!

Wednesday, March 4 2009

AVR on Gentoo

I finally got to work my avr toolcain on Gentoo. A lot of people are expiriencing problems using this, since crossdev, a tool provided by gentoo, has messed up dependencies for the AVR stuff. It fails to install the avr-libc-headers because avr-gcc is missing. Well, crossdev is not helpful anymore, so you just do it yourself:

# emerge -av cross-avr/binutils
# emerge -av cross-avr/gcc
# emerge -av cross-avr/avr-libc

Don't worry - avr-libc also contains the headers :-)

Now you will fail making your code with any avr as target. The problem is, that ldscripts is not in the right path. The search path is /usr/avr/lib, so you have to make a symlink:

# ln -s /usr/lib/binutils/avr/{binutils-version}/ldscripts /usr/avr/lib/ldscripts

In my case it is:

# ln -s /usr/lib/binutils/avr/2.19.1/ldscripts /usr/avr/lib/ldscripts

Now everything should work - at least it did for me :-D

Wednesday, November 26 2008

MySQL -> RSS/Atom Feed

Hi everyone,

I'm here to present my first minor project I actually brought to a usable version :-)

Here's the thing:

It is a little PHP-script generating RSS and Atom-feeds. It reads to newest 5 entried from a database and formats them according to the RSS2/Atom1 specs. It was formerly designed for the DiB-Comic, because it lacked syndication support (Well, in fact it still does, because the author didn't respond yet). Anyway, here is how to do it:

  1. change the file's name to feed.php and put it to your webspace
  2. set the values of the $mysql-array corresponding to your server settings
  3. set the values of the $feed-array the way it suits you best
  4. add a line like

<link rel="alternate"
type="application/rss+xml"
title="RSS 2.0 syndication"
href="http://url.to/your/feed.php?type=rss" />

or

<link rel="alternate"
type="application/atom+xml"
title="Atom 1.0 syndication"
href="http://url.to/your/feed.php?type=atom" />

as a child of the <head>-element on every of your website's (X)HTML-files. Now you should see a RSS-logo in your address bar of firefox (or whereever it appears in you browser) and be able to subscribe to it. I tested this script on firefox, please report incompabilities and bugs! Get it here!

Monday, September 15 2008

PasteBox - eine lokale Installation unter Gentoo

Heute habe ich mir lokal PasteBox, den Postbin von pastebin.ch installiert, damit ich hin und wieder ein bischen Code mit mit Freunden teilen kann, ohne, dass gleich jeder pastebin-user davon weiss. Es gab allerding einige Probleme: Zum einen wollte PostBox unbedingt .htaccess haben, nun gut, ich habe die mod_rewrites konvertiert und in die lighttpd.conf geschrieben:

url.rewrite = (
"^/pastebin/$" => "/pastebin/sys/index.php",
"^/pastebin/new$" => "/pastebin/sys/new.php",
"^/pastebin/rss$" => "/pastebin/sys/index.php?ot=rss",
"^/pastebin/comment/(\d+)$" => "/pastebin/sys/entry.php?id=$1",
"^/pastebin/(\d+)$" => "/pastebin/sys/entry.php?id=$1",
"^/pastebin/(\d+)/(.+)$" => "/pastebin/sys/entry.php?id=$1&ot=$2"
)

Dann musste ich zweimal PHP neu komilieren, damit ich erst die 'pdo'-USE-Flag setzen kann, damit er mir direkt dannach sagen kann, dass er auch noch 'ctype' braucht. Verdammt, kann man das nicht dazuschreiben?! Naja, jetzt geht es...endlich.