msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

27 Jan 2007 WebDAV with cadaver

Upload multiple files:

cadaver mput DSC*

Uploads all files named DSC* in reverse order, greatest number first.

I’m using cadaver to upload files to my eZ Publish CMS site.

Tags: , ,

Posted by

27 Jan 2007 Watermark images with imagemagick ++

Script som legger til watermark tekst:

#!/bin/bash
width=`identify -format %w DSC06861.JPG`; \
        convert -background '#0008' -fill white -gravity center -size ${width}x90 \
        -pointsize 36 \
        caption:"Copyright (c) 2007 Pario.no" \
        +size DSC06861.JPG +swap -gravity north -composite  Output_image_watermarked.jpg

Vis hvilke bildeformater imagemagick støtter:
convert identify -list format

Tags: , , ,

Posted by

26 Jan 2007 Print PHP array content

echo "<pre>
print_r($_POST);
print_r($_GET);
print_r($_REQUEST);
</pre>";
?>

Tags: ,

Posted by

26 Jan 2007 USB Corsair Flash Voyager and udev rules

I had some problems making my new Corsair Flash Voyager 1Gb work under udev. Until now I used the SYSFS{serial}= part from udevinfo to distinguish my usb devices. Corsair Flash Voyager doesn’t have one. So I put the following line in /etc/udev/rules.d/10-local.rules to make it work:

KERNEL="sd*", SYSFS{vendor}="Corsair", SYSFS{model}="Flash*Voyager*", NAME{all_partitions}="corsair%n", GROUP="disk"

The first partition of the usb stick is now recognized as /dev/corsair1, and if I had more they would be named /dev/corsair2, /dev/corsair3, etc

Source: http://www.void.gr/kargig/blog/2006/03/21/usb-corsair-flash-voyager-and-udev-rules/

Tags: ,

Posted by

24 Jan 2007 How do I turn enforcing SELinux on/off at boot?

You can specify the SELinux mode using the configuration file /etc/sysconfig/selinux.

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

Setting the value to enforcing is the same as adding enforcing=1 to your command line when booting the kernel to turn enforcing on, while setting the value to permissive is the same as adding enforcing=0 to turn enforcing off. Note that the command line kernel parameter overrides the configuration file.

However, setting the value to disabled is not the same as the selinux=0 kernel boot parameter. Rather than fully disabling SELinux in the kernel, the disabled setting instead turns enforcing off and skips loading a policy.

Source: http://fedora.redhat.com/docs/selinux-faq-fc3/index.html#id2825945

Tags: , , ,

Posted by