Scientific Linux and Centos 6.x Multimedia How-to 32-bit and 64-bit

Submitted by sklav on Thu, 05/05/2011 - 00:21

**** Update i recommend you install yum priorities plugin to avoid base system files getting replaced. As of this writing the files replaced are alsa based files and causes no system issues, but for some modifying the base system is an issue, so i have tested the whole install again with the priorities plugin and all works as expected. ****

Now just to be clear all this works for both 32-bit and 64-bit Scientific Linux.

Mysql Cheat Sheet for Grant Permissions

Submitted by sklav on Fri, 02/04/2011 - 11:11

An example of how to add SELECT privileges to a user using GRANT

GRANT SELECT ON projectdb.* TO user@'localhost' IDENTIFIED BY 'passwd';

If SELECT is not enough for our user we can add more privileges using a query similar to the one below:

An example of how to add a selection of privileges to a user using GRANT

GRANT SELECT, INSERT, DELETE ON projectdb.* TO user@'localhost' IDENTIFIED BY 'passwd';

If you want to GRANT ALL the privileges to a user then use this query:

An example of how to Grant Privileges in MySQL

Enable Gnome Metacity Compositing for special effects

Submitted by sklav on Tue, 11/30/2010 - 13:45

Activate gnome composite effects

gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true

Deactivate gnome composite effects

gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool false

Original reference

http://tombuntu.com/index.php/2008/03/31/enable-metacity-compositing-in…

Coverting Maildir to mbox

Submitted by sklav on Mon, 04/12/2010 - 15:12

#!/bin/sh
progname=`basename $0`
die(){ echo "$progname: $*">&2; exit 1; }
test $# -eq 1 || die "syntax: $0 maildirname"
cd "$1" || die "$0: cannot cd to $1"
test -d tmp -a -d new -a -d cur || \
die "$0: $1 does not appear to be a maildir"
find cur -type f|sort|while read f;do
formail -I 'Status: RO' <$f
done
find new -type f|sort|while read f;do
formail -I 'Status:' <$f
done

Note: This works on a per user basis but can be modified to work system wide.

Apache mod_security for Centos 5.x / RHEL 5.x

Submitted by sklav on Thu, 03/18/2010 - 15:47

Since i didn't want to have to go down that route i decided to build mod_security based on the version of Apache that ships with Centos 5.x / RHEL 5.x Now I cannot take full credit for creating the srpm which i copied from www.modsecurity.org

But i have built the associated rpm based on the version of Apache shipped with Centos 5.x / RHEL 5.x using the well written spec file created by the aforementioned site.

Cannot Open the Outlook Window

Submitted by sklav on Wed, 02/10/2010 - 17:23

If you Google this problem, Microsoft’s site shows up, so you assume that the solution might be a good one. Actually, it didn’t work for me and is not even related to the actual problem at hand since they refer to this being an issue running Outlook in compatibility mode.

The solution? simply run: outlook.exe /resetnavpane on a command line

in my case i had to specify the full path to the binary.

c:\Program Files\Microsoft Office\Office12\outlook.exe /resetnavpane

Hardening php on centos 5.x with suhosin

Submitted by sklav on Tue, 11/03/2009 - 13:18

Step 1: (adding the repo)

touch /etc/yum.repos.d/centos-testing.repo

paste the code below into the file we created above using your favourite text editor

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php-suhosin

Using GMirror on FreeBSD 7.1

Submitted by sklav on Mon, 08/24/2009 - 12:46

[Allow the mounted disk (ad0) to be modified by gmirror]

This step allows the gmirror utility to modify your drive while it is mounted and is a one time operation during gmirror setup, and will not be restored on reboot.

# sysctl kern.geom.debugflags=16

[Create the mirror on ad0]

This command modifies the drive label meta-data on your hard disk so that it is recognized as a gmirror RAID disk. In the example I set gm0 but you can give it any label you like as long as you’re consistent. You will need this later to modify your /etc/fstab.