Here is a quick’n dirty and maybe incomplete guide on howto turn a CentOS PC into an internet router. I mainly focused on network/firewall setup. Continue reading “CentOS as DSL-Router/Firewall HowTo”
Author: georg
NTP-Daemon auf CentOS-Internet-Router
Beim Betrieb von Netzwerk-Komponenten ist es wichtig jeweils die korrekte Zeit zur Verfügung zu haben. Für einige Anwendungen wie z.B. NFS und Log-Files ist dies missionskritisch.
Im Folgenden kurz die Erfahrungen bei der Konfiguration eines CentOS5-Rechners als Internet-Router wobei der NTP-Daemon als Zeitserver eingerichtet wird. Continue reading “NTP-Daemon auf CentOS-Internet-Router”
Disable sandbox for local flash applications
Howto deactivate the flash sandbox for locally running flash applications?
Create the following directory structure in your Windows profile directory
ApplicationData\Macromedia\Flash Player\\#Security\FlashPlayerTrust
There you can add arbitrary files with the name *.cfg . Flash player will parse them all. Inside one such file you can add multiple pathes, each path name in a new line. Path can point to directories or single SWF files. If a directory name is given the sandbox is disabled for SWF files in the whole subdirectory structure.
As an administrator there is also the possibility to set those pathes for all users of a computer. For more information see Adobe’s flashplayer security manual.
Höhenprofil mit GPSBabel / XCSV-Format
GPSBabel kann neben Formatkonvertierungen auch in begrenztem Umfang Auswertungen/Berechnungen im XCSV-Format durchführen. Eine Möglichkeit z.B. ein Höhenprofil zu erstellen, besteht
gpsbabel -i gpx -f filename -o xcsv,style=style_height_profile.txt -F filename_height_profile.csv
In style_height_profile.txt steht dann sowas drin:
DESCRIPTION Heigh profile EXTENSION csv FIELD_DELIMITER COMMA RECORD_DELIMITER NEWLINE PROLOGUE Distance,Altitude # DATA FIELDS IFIELD PATH_DISTANCE_KM,"","%f" IFIELD ALT_METERS,"","%.0f"
Weitere Informationen siehe GPSBabel-Doku.
Dubletten in SQL-Datenbanken finden
Gegeben sei ein Tabelle t, die Dubletten in der Spalte s hat. Außerdem hat die Tabelle noch einen Primary Key in der Spalte id.
Folgender Code findet die Dubletten:
[geshi lang=sql]
SELECT t1.s, t2.s FROM t AS t1, t as t2
WHERE ( (t1.s=t2.s) AND (t1.id < t2.id) );
[/geshi]
Würde "t1.id<>t2.id” stehen, würden alle Dubletten zweimal auftauchen. Sollen Dubletten aus zwei verschiedenen Tabellen abgeglichen werden, hat man diese