optimize XFS for a RAID array

This script helps you to find the right mkfs.xfs command.
Source: http://www.mythtv.org/wiki/Optimizing_Performance#Further_Information

Continue reading

Posted in IT, Linux | Leave a comment

MySQL: binary search without index

This is a flash of a genius:

http://linxtrix.com/2007/09/19/tricking-mysql-to-use-index-on-binary-search/

Problem: you can’t search case insensitive words. This trick will “do” it for you.

Make a test between this two ways:

SELECT * FROM test WHERE binary login = ‘SomeCaseSensitiveLogin’

is million times slower then

SELECT * FROM test WHERE login = ‘SomeCaseSensitiveLogin’ AND binary login = ‘SomeCaseSensitiveLogin’
Posted in IT | Leave a comment

Import Ingo (Horde) sieve rules into Roundcube

1. Replace the default managesieve plugin by sieverules

2. Copy the old ruleset to the place, where dovecot is looks for it.
In case of cyrus-imapd it’s here by default: /var/spool/sieve/

3. Rename it from ingo.script to ingo.sieve

4. Go to Roundcube -> Filters
There should appear a message:

No existing filters detected!

Import filters: Another set of filters from Horde (INGO) has been found. Would you like to import these filters into your current set?
Posted in IT | Leave a comment

mdadm run existing array

mdadm -A /dev/md5 /dev/sd[dc]1

Posted in Uncategorized | Leave a comment

tcpdump+wireshark

This command can be used to make tcpdump output readable by wireshark:

tcpdump -vv -s 0 -i eth0 -w tcpdump.out tcp and port 4880

with headers and data

tcpdump -i eth0 -s 1024 -l -A 'port 80 and host 1.2.3.4'
Posted in BSD, IT, Linux | Leave a comment

OS X + samba

unix extensions = on

From this mail.

Posted in Uncategorized | Leave a comment

What is sed?

Sed is a very powerful tool. A simple sed statement may turn a cat into cement.
Observe: echo cat | sed statement

Posted in Fun, IT, Quotes | Leave a comment

KVM: using a single partition [not ready]

The original howto can be found here: http://tips.at.gg3.net/2008/07/17/kvm-virtualize-a-single-partition/ .
Actually it did not work for me out of the box.

The main goal of this howto is the ability of using a single real partition as a single partition in the VM (like with Xen). I’ve just realized, it’s not possible on an easy way….

Continue reading

Posted in IT, Linux, Uncategorized | Leave a comment

tuning zsh

not expanding wildcards:

$ setopt NOGLOB

Posted in Uncategorized | Leave a comment

dh-make-perl usage

$ apt-get install dh-make-perl

$ dh-make-perl –build –cpan Mail-DeliveryStatus-BounceParser

Posted in Uncategorized | Leave a comment

grub text mode matrix table

From here:

320×200 640×400 640×480 800×500 800×600 896×672 1024×640 1024×768 1152×720 1280×1024 1440×900 1600×1200
4 bit 770 772 774
8 bit 768 769 879 771 815 874 773 869 775 864 796
15-bit 781 801 784 880 787 816 875 790 870 793 865 797
16-bit 782 802 785 881 788 817 876 791 871 794 866 798
24-bit 783 803 786 882 789 818 877 792 872 795 867 799
32-bit 804 809 883 814 819 878 824 873 829 868 834

A more complete list you can find here.

Continue reading

Posted in Uncategorized | Leave a comment

ESET NOD32 + Debian/Ubuntu + paravirtualized guest

$ apt-get install ia32-libs

$ dpkg -i –force-architecture esets-3.0.15.i386.deb
dpkg – warning, overriding problem because –force enabled:
package architecture (i386) does not match system (amd64)
Selecting previously deselected package esets.
(Reading database … 16356 files and directories currently installed.)
Unpacking esets (from esets-3.0.15.i386.deb) …
Setting up esets (3.0.15) …
Unpacking esets modules …
tar: /dev/stdin: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
dpkg: error processing esets (–install):
subprocess post-installation script returned error exit status 2
Processing triggers for man-db …
Errors were encountered while processing:
esets

ln -s /proc/self/fd/0 /dev/stdin
ln -s /proc/self/fd/1 /dev/stdout
ln -s /proc/self/fd/2 /dev/stderr

Posted in IT, Linux, Ubuntu | Leave a comment

LXC on Ubuntu

This small howto describes a basic installation Linux Containers on Ubuntu 10.04 Lucid (or on Debian Sid).

A good howto, which describes and explains many things, but Archlinux specific: http://wiki.archlinux.org/index.php/Linux_Containers#Host_device_access_settings
Continue reading

Posted in IT, Linux, Ubuntu | Leave a comment

Clapf+postfix install

Clapf is a powerful fast and simple spam- and virusfilter. It’s made in Hungary by Janos Suto.
Official website: http://clapf.acts.hu

I wrote a howto: http://clapf.acts.hu/wiki/doku.php/howto:ubuntu_clapf_mysql_libclamav

Posted in IT | Leave a comment

Clonezilla quick howto

This small howto describes, how to install and configure Clonezilla.

Clonezilla is a bit similar to Norton Ghost. Its biggest disadvantage is, that it cannot clone a HDD or a device to a smaller one.

It’s developed on Ubuntu, but the stable releases are based on Debian.

Offiicial website: http://www.clonezilla.org/

Continue reading

Posted in IT | Leave a comment

Thunderbird useful addons

keyconfig: http://mozilla.dorando.at/keyconfig.xpi

functions for keyconfig: http://pqrs.org/firefox/extensions/functions_for_keyconfig/

QuickFolders: https://addons.mozilla.org/en-US/thunderbird/addon/3254

Lightning: https://addons.mozilla.org/en-US/thunderbird/addon/2313

Compatibility Reporter: https://addons.mozilla.org/hu/thunderbird/addon/15003

Posted in IT | Leave a comment

vim tuning

Some improvements to vim for usability.

Continue reading

Posted in BSD, IT, Linux | Leave a comment

Ambrose Bierce

Lét: az öröklét általunk ismert része. – Ambrose Bierce

Posted in Fun, Quotes | Leave a comment

generate self-signed certificate in one command

DOMAIN=
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -keyout $DOMAIN.pem -out $DOMAIN.pem

Posted in IT | Leave a comment

generate certificate request

openssl req -new -keyout DOMAIN.key -out DOMAIN.csr -config DOMAIN.cnf

Continue reading

Posted in IT | Leave a comment

crontab regular jobs: clapf, backup, apt-get, mysql

These crontab entries are for a common (email) server, they can be used in common on any server.

Continue reading

Posted in BSD, IT, Linux | Leave a comment

Apache SSL + proxy

SSLProxyEngine on
ProxyPass       /                       https://192.168.1.1/
ProxyPreserveHost On

Posted in IT | Leave a comment

MLF listaarchívumok keresése

http://groups.google.com/group/hun.lists.mlf.linux/topics

http://groups.google.com/group/hun.lists.mlf.linux-flame/topics

http://groups.google.com/group/hun.lists.mlf.linux++/topics

Posted in IT, Linux, Uncategorized | Leave a comment

GRUB kiirasa az osszes meghajtora (SATA, SCSI)

grub>

device (hd0) /dev/sda
# /boot partition
root (hd0,0)
setup (hd0)

device (hd0) /dev/sdb
# /boot partition
root (hd0,0)
setup (hd0)

Posted in IT, Linux | Leave a comment

Active vs. passive ftp

http://slacksite.com/other/ftp.html

Active FTP :
command : client >1024 -> server 21
data : client >1024 <- server 20

Passive FTP :
command : client >1024 -> server 21
data : client >1024 -> server >1024

Posted in IT | Leave a comment

Nyomtatókat automatikusan felcsatolo vbs logon szkript (attach printer logon script)

This small vbs script automatically attach proper printers for users.

Continue reading

Posted in IT, Windows | Leave a comment

Redirect from html

Redirect the browser after some seconds to an URL.

In this example in 5 seconds.

<META HTTP-EQUIV="REFRESH" CONTENT="5 ; URL=http://rtfm.co.hu">
Posted in IT | Leave a comment

Urlapok

Egy teljes, magyar nyelvű leírás html űrlapok készítéséről.

http://download.rtfm.co.hu/pub/urlapok.html

Full html forms mini-howto, unfortanetely in Hungarian.

http://download.rtfm.co.hu/pub/urlapok.html

Posted in IT, Uncategorized | Leave a comment

vi quick tutorial magyarul

Remek vi leírás sürgős esetekre:

http://www.vajko.hu/vitutor.html

Posted in BSD, IT, Linux | Leave a comment

xorg.conf + wacom

A full example xorg.conf for using wacom.

Continue reading

Posted in BSD, IT, Linux, Uncategorized | Leave a comment

windows key shortcuts

Windows + D: Minimize or restore all windows
Windows + E: Display Windows Explorer
Windows + F: Display Search for files
Windows + Ctrl + F: Display Search for computer
Windows + F1: Display Help and Support Center
Windows + R: Display Run dialog box
Windows + break: Display System Properties dialog box
Windows + shift + M: Undo minimize all windows
Windows + L: Lock the workstation
Windows + U: Open Utility Manager
Windows + Q: Quick switching of users (Powertoys only)
Windows + Q: Hold Windows Key, then tap Q to scroll thru the different users on your PC

Posted in IT, Windows | Leave a comment

Tuning broadband connections on Windows

This is for broad band connections. I didn’t try it on dial up but might work for dial up.

1. make sure your logged on as actually “Administrator”. do not log on with any account that just has administrator privileges.
2. start – run – type gpedit.msc
3. expand the “local computer policy” branch
4. expand the “administrative templates” branch
5. expand the “network branch”
6. Highlight the “QoS Packet Scheduler” in left window
7. in right window double click the “limit reservable bandwidth” setting
8. on setting tab check the “enabled” item
9. where it says “Bandwidth limit %” change it to read 0

Effect is immediate on some systems, some need to re-boot. This is more of a “counter what XP does” thing. In other words, programs can request up to 20% of the bandwidth be reserved for them, even with QoS disabled, this is no big deal and most programs do not request it. So, although QOS has caused a big stink because people think it reserves 20% of their bandwidth, you can still disable it, just to be sure, hehe.

Posted in Uncategorized | Leave a comment

Windows cmd file/dir completion

Ez a KB cikk bemutatja, hogyan kapcsolhatjuk be a fájl- és könyvtárkiegészítést a Windows command promptban.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q310530

Posted in Uncategorized | Leave a comment

rendszer masolasa tar segitsegevel

# tar -cf – –exclude /proc –exclude /mnt / | (cd /mnt && tar xf – )

Posted in Uncategorized | Leave a comment

updatedb fix

# updatedb
updatedb: src/updatedb.c:730: scan_cwd: Assertion `name_size > 1′ failed.
Aborted

A /etc/updatedb.conf fájlba fel kell venni a /sys könyvtárt és a sysfs fájlrendszert.

Posted in Uncategorized | Leave a comment

Lustre: írás kikapcsolása egy node-on

A meta szerveren szükséges kiadni.

Continue reading

Posted in Uncategorized | Leave a comment

DRBD 7: split brain safety recovery

Problem:

A drbd 0.7 cluster is in split-brain mode and both node was in Primary state. The BAD node wants to be SyncSource, even if its cstate is Secondary.

Goal: sync bytes from GOOD node to BAD node.

Continue reading

Posted in Uncategorized | Leave a comment

Lustre: fsck quick howto

fsck.ext3 -f -C 0 -v -y /dev/sdb1

-f: force
-C 0: folyamatjelző
-v: verbose
-y: automatikus javítás

Posted in Uncategorized | Leave a comment

PGSQL: dipla ID-k keresése

SELECT * FROM (SELECT "ID", COUNT("ID") AS aa FROM gallery GROUP BY "ID") AS bb WHERE bb.aa>1;

(by kk)

Posted in Uncategorized | Leave a comment

rsync warning: some files vanished before they could be transferred (code 24) at main.c(977)

Ezt a hibaüzenetet az rsync adja vissza bizonyos esetekben. Valójában nem hiba, csupán az error code (24) miatt veszi annak pl. a dirvish. Valójában csak információs üzenet.

Az rsync hivatalos FAQ-ja alapján a workaround egy frontend script alkalmazása:

rsync-novanished.sh:

#!/bin/sh
rsync "$@"
e=$?
if test $e = 24; then
exit 0
fi
exit $e
Posted in Uncategorized | Leave a comment