Posts Tagged ‘ linux

goAccess ein Apache, NginX real-time log analyzer

so eben gefunden und für cool befunden :)

wer sich bisher mit grep und awk duch seine logs hangelt sollte sich mal goAccess anschauen.

http://goaccess.prosoftcorp.com/

einfacher geht es nicht

goaccess -f /var/log/apache2/access.log

oder wer wie ich ungerne zusätzliche software auf seinem Server Installiert.

ssh user@server 'cat /var/log/apache2/access.log' | goaccess

und so sieht das ganze aus.

goaccess

Build and Install Cinepaint on Ubuntu 10.10

Cinepaint lässt sich zurzeit leider nicht so einfach unter Debian oder Ubuntu Installieren. Aber mit ein paar Anpassungen lässt es sich aus dem CVS bauen.

Hier eine kurze schritt für schritt Anleitung.

1. ubuntu-cvs.sh speichern.

2. In ubuntu-cvs.sh Zeile 24 in “export LD_LIBRARY_PATH=/usr/lib/local” ändern.

3. CVS per “apt-get install cvs” installieren.

4. Skript mit “sh ubuntu-cvs.sh” ausführen (bricht bei ersten Durchlauf ab)

5. ca. Zeile 304 “cvs/cinepaint-project/cinepaint/plug-ins/collect/collect.cpp”

- gimp_layer_set_name (layers[0], strrchr(fc->value(1),'/')+1);
+ gimp_layer_set_name (layers[0], (char *)(strrchr(fc->value(1),'/')+1));

6. ca. Zeile 341 “cvs/cinepaint-project/cinepaint/plug-ins/collect/collect.cpp”

- gimp_layer_set_name(layers[0], strrchr(fc->value(i),'/')+1);
+ gimp_layer_set_name(layers[0], (char *)(strrchr(fc->value(i),'/')+1));

7. Skript mit “sh ubuntu-cvs.sh” erneut ausführen.

Fundsache – Links und Termine

Ob Dich der Konsum von Whisky aus Diabetiker-Urin oder eher das Arbeitsumfeld von Hemingway inspiriert, musst Du selbst entscheiden. Wünsche jedenfalls viel Spaß und Inspiration mit der frisch umbenannten Linksliste…

Links

Termine

Eins, zwei, drei, ganz viele….

CSS Icons

Buttons mit Icons

Für manche Projekte benötigt man eine Menge Icons, die durch eine CSS-Klasse z.B. auf einen Button angewendet werden sollen. Also sucht man sich aus einem der bekannten und beliebten Iconsets das Benötigte zusammen und pflegt diese in einer separaten CSS-Datei.

Das wird gerade bei vielen Icons sehr fehleranfällig und zeitaufwendig. Dabei lässt sich dieser Schritt einfach automatisieren. Alles, was Ihr dazu braucht, liefern Pinguin- und Apfel-Betriebssysteme bereits mit.

Erstmal kopiert ihr dazu alle benötigten Icons in einen eigenen Ordner neben eurem bestehenden Style-Sheet. Ich ergänze diesen immer noch um die Angabe der entsprechenden Icongröße wie z.B.

"icons_16"

für 16x16px große Icons. Nun öffnest du einen Terminal, wechselst in das soeben erstellte Verzeichnis und führst dort ein bisschen Shell Magic aus. Die erstellt Dir den benötigten Stylesheet und speichert diesen als icons_16.css.

mv ../icons_16.css ../icons_16.css.bac; \
for file in `ls`; \
do echo "a.icon_16_${file%%.*} { background:url($file) }"  \
>> ../icons_16.css; done;

komplett kopieren und im Terminal einfügen

danach sollte deine Ordnerstruktur ungefähr so aussehen:

/Project
  /index.html       # Das HTML-Projekt
  /icons_16.css     # Die erstellte CSS-Datei
  /icons_16         # Dein Icon-Ordner
    /icon_a.png
    /icon_b.png
  /style.css        # Dein regulärer Style

In der “style.css” definierst Du nun wie gewohnt den Basis-Look Deines Buttons und importierst lediglich noch die “icons_16.css” am Anfang des Dokumentes.

@import url(icons_16.css);

a {
    display:block;
    float:left;
    padding:10px 10px 10px 32px;
    margin:0px 10px 10px 0px;

    background: 10px center no-repeat #333;
    text-decoration:none;
    color: #fff;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
}

a:hover {
    background-color: #999;
    color: #333;
}

Nun kannst du jedem Button durch Verwendung einer Klasse, die sich aus “icon_16_” + den Dateinamen der Bilddatei zusammensetzt, automatisch das entsprechende Icon zuordnen.

<a href="#" class="icon_16_emoticon_happy">emoticon_happy.png</a>

in diesem Fall das “happy emoticon”.

emoticon_16_happy

Button mit Emoticon Happy Icon

Alle benötigten Daten habe ich hier nochmal zum Download zusammengefasst: icon_site.zip

moreutils – a growing collection of unix tools

moreutils a growing collection of the unix tools that nobody thought to write long ago when unix was young

I never heard about moreutils befor, but the toolset looks very usefull.

  • combine: combine the lines in two files using boolean operations
  • ifdata: get network interface info without parsing ifconfig output
  • ifne: run a program if the standard input is not empty
  • isutf8: check if a file or standard input is utf-8
  • lckdo: execute a program with a lock held
  • mispipe: pipe two commands, returning the exit status of the first
  • parallel: run multiple jobs at once
  • pee: tee standard input to pipes
  • sponge: soak up standard input and write to a file
  • ts: timestamp standard input
  • vidir: edit a directory in your text editor
  • vipe: insert a text editor into a pipe
  • zrun: automatically uncompress arguments to command

Simple and fast Appliance Setup

With Ubuntu’s vmbuilder the creation of a virtual appliance is fast and easy. Try something like this and your get an ready to use image.

sudo vmbuilder kvm ubuntu \
--arch 'amd64' \
--rootsize '4096' \
--components 'main,universe' \
--addpkg mysql \
--user 'ubuntu' --pass 'ubuntu' \
-v --debug

USB Network for SHR

Sharing your hosts network connection with your freerunner is pretty simple under Debian and Ubuntu. Create a script with the following code and you are done.

#!/bin/bash
sudo iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
sudo sysctl -w net.ipv4.ip_forward=1
sudo ip addr add 192.168.0.200/24 dev eth2
sudo ip link set eth2 up
scp /etc/resolv.conf root@192.168.0.202:/etc/resolv.conf
ssh -X root@192.168.0.202