среда, 21 декабря 2011 г.

Name HTML color


Color NameHEXColorShadesMix
AliceBlue #F0F8FF ShadesMix
AntiqueWhite #FAEBD7 ShadesMix
Aqua #00FFFF ShadesMix
Aquamarine #7FFFD4 ShadesMix
Azure #F0FFFF ShadesMix
Beige #F5F5DC ShadesMix
Bisque #FFE4C4 ShadesMix
Black #000000 ShadesMix

Proxychains + SSH + Tunel

Тунель должен быть создан из под рута.

Без proxychains

$ sudo ssh user@host -p port -v -L local_port:destination_host:destination_port


# ssh user@host -p port -v -L local_port:destination_host:destination_port

и через proxychains

$ sudo proxychains ssh user@host -p port -v -L local_port:destination_host:destination_port


# proxychains ssh user@host -p port -v -L local_port:destination_host:destination_port

вторник, 20 декабря 2011 г.

Как склеить несколько видео файлов в Linux

1. С помощью cat и mencode(необходимо установить одноименный пакет)
$ cat file1.avi file2.avi > file0.avi
mencoder -forceidx -oac copy -ovc copy file0.avi -o file.avi
или одной строкой через ковеер
$ cat file1.avi file2.avi | mencoder - -forceidx -oac copy -ovc copy -o file.avi

2. С помощью avimerge который входит в пакет transcode-utils

$ avimerge -i file1.avi file2.avi -o file.avi

понедельник, 19 декабря 2011 г.

CentOS: установка Oracle 10gR2

  • 1. Устанавливаем пакеты:
    - compat-db-4.2.52-5.1.i386.rpm
    - sysstat-7.0.2-1.el5.i386.rpm
    - libaio-devel-0.3.106-3.2.i386.rpm
    - libXp-1.0.0-8.1.el5.i386.rpm
    - compat-libstdc++-33
    - gcc

    Выключаем SELINUX
  • 2. Вносим изменения в файл /etc/sysctl.conf - добавляем в него строки:

    kernel.shmmax = 2147483648
    kernel.shmall = 2097152
    kernel.shmmni=4096
    kernel.sem=250 32000 100 128
    fs.file-max=65536
    net.ipv4.ip_local_port_range=1024 65000
    net.core.rmem_default=1048576
    net.core.rmem_max=1048576
    net.core.wmem_default=262144
    net.core.wmem_max=262144

    и применяем настройки

    /sbin/sysctl –p

FCHMOD: системные вызовы.

#include 
#define S_IRWXU 0000700    /* RWX mask for owner */
#define S_IRUSR 0000400    /* R for owner */
#define S_IWUSR 0000200    /* W for owner */
#define S_IXUSR 0000100    /* X for owner */
#define S_IRWXG 0000070    /* RWX mask for group */
#define S_IRGRP 0000040    /* R for group */
#define S_IWGRP 0000020    /* W for group */
#define S_IXGRP 0000010    /* X for group */
#define S_IRWXO 0000007    /* RWX mask for other */
#define S_IROTH 0000004    /* R for other */
#define S_IWOTH 0000002    /* W for other */
#define S_IXOTH 0000001    /* X for other */
#define S_ISUID 0004000    /* set user id on execution */
#define S_ISGID 0002000    /* set group id on execution */
#ifndef __BSD_VISIBLE
#define S_ISTXT 0001000    /* sticky bit */
#endif

int main()
{
  if(chmod("file" , 0777) < 0 )  
  {
     printf("change mode of file FILE failed \n");
     return -1;
  }
  printf("Chmod system call successful \n");
  return 0;
}