Kategoriarkiv: Linux

arraystore.php

<? # arraystore.php – Copyright(c) 2005 by Mikkel C.M.Christensen # # Stores and retrieves arrays of the following format from plaintextfiles: # $array = array( array (“”,””), # array (“”,””), # array (“”,””)); # # The char “|” are used … Læs resten

Udgivet i Knowledge Base, Linux, Old Base, Programmering | Skriv en kommentar

mod_proxy config

<VirtualHost thor.btworld.dk> ServerName thor.btworld.dk DocumentRoot /var/www/thor_redirect/htdocs ProxyPass /samurize/ http://thor.btworld.dk/samurize/ ProxyRequests Off </VirtualHost>

Udgivet i Apache, Knowledge Base, Linux, Old Base | Skriv en kommentar

Billedredigering med imagemagick

Rotate pictures? mogrify -rotate 90/180 */001.jpg Resizing picture mogrify -size 120×120 -resize 120×120 +profile “*” *.jpg

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

how to add a user to a group

This is a nice way to add a user to a new group, from any script or other non-interactive metod: usermod -G $(id -nG root | sed -e “s/ /,/g”),vmail root

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

How to use Squid to stop computer worms and vira

[My credit goes to this clever hacker: http://www.aub.dk/~misak/index.php/archives/2004/10/27/35/] I am a one of the administrators for a network with about 900 residential users. We have no control over what people are running on their computer and therefor we get our … Læs resten

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

High Availablitiy Clusters in Linux

Forskellinge links jeg har fundet på min jagt om emnet: LinuxHA , Failover, heartbeat o.l. snask: http://linux-ha.org/download/GettingStarted.html Network Block Device + Raid http://www2.linuxjournal.com/article/3778 Distributed Remote Block Device http://www.drbd.org/

Udgivet i Knowledge Base, Linux, Networking, Old Base | Skriv en kommentar

Adding Quotas to Linux operating System

Activate Quotas in kernel: File systems —> Quota support [*] Quota support <*> Old quota format support <*> Quota format v2 support emerge quota rc-update add quota boot Add quota to the partition in /etc/fstab /dev/hde1 /quota ext2 usrquota,grpquota 1 … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

GTK hello world in C (Not with Glade)

#include <gtk/gtk.h> /* * This is a callback function. The data arguments are ignored * in this example. More on callbacks below */ static void hello(GtkWidget *widget, gpointer data){ g_print(“Hello World\n”); }; static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data){ … Læs resten

Udgivet i Knowledge Base, Linux, Old Base, Programmering | Skriv en kommentar

Lave simpel iso med mkisofs

mkisofs -r -o cd_image dir/

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Creating chrooting init scripts in gentoo

just create something similar to this: start() { ebegin “Starting ${CHROOT:+chrooted }dhcpd” start-stop-daemon –start –quiet –exec /usr/sbin/dhcpd \ — -pf /var/run/dhcp/dhcpd.pid \ -user dhcp -group dhcp ${DHCPD_OPTS} \ ${CHROOT:+-chroot ${CHROOT}} ${IFACE} eend $? } stop() { ebegin “Stopping dhcpd” start-stop-daemon … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar