Skip to content

Instantly share code, notes, and snippets.

View sokolov-denis's full-sized avatar

sokolov-denis

  • B2B-Center
  • Moscow
View GitHub Profile
docker run --rm -it -v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK):ro -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu bash
# Cache to store the SSL sessions
ssl_session_cache shared:SSL:32m;
ssl_session_timeout 8h;
# Specifies the enabled ciphers
ssl_ciphers kEECDH+AESGCM+AES128:kEECDH+AES128:kRSA+AESGCM+AES128:kRSA+AES128:kRSA+3DES:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
# Specifies that server ciphers should be preferred over client ciphers when
# using the SSLv3 and TLS protocols.
ssl_prefer_server_ciphers on;
# Check ARGS
_ifs=$IFS
IFS=""
if [ -n "${*//[0-9a-z_-]/}" ]; then
exit 1
fi
IFS=$_ifs
@sokolov-denis
sokolov-denis / exim_greylisting.txt
Created June 18, 2017 10:39
Simple greylisting for exim
# mkdir -p /var/spool/exim4/greylist/{{a..z},{A..Z},{0..9}}
# chown -R Debian-exim:Debian-exim /var/spool/exim4/greylist
# find /var/spool/exim4/greylist -atime +30 -type f -delete
GREY_DIR=/var/spool/exim4/greylist
warn
set acl_m_greyfile = GREY_DIR/${if def:sender_address{${length_1:$sender_address}}{${length_1:$local_part}}}/$sender_host_address,$sender_address,$local_part@$domain
pidof apache2 | xargs -n1 gdb -batch -ex "set pagination 0" -ex "thread apply all bt 5" -p
lizardfs-admin info 127.0.0.1 9421
lizardfs-admin list-metadataservers 127.0.0.1 9421
lizardfs-admin ready-chunkservers-count 127.0.0.1 9421
lizardfs-admin list-chunkservers 127.0.0.1 9421
lizardfs-admin chunks-health 127.0.0.1 9421
lizardfs-admin list-disks 127.0.0.1 9421
lizardfs-admin list-mounts 127.0.0.1 9421
@sokolov-denis
sokolov-denis / Makefile
Created November 25, 2016 09:28 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
#!/usr/bin/env bash
# Check vault files
UNENCRYPTED=$(grep --exclude=".?*" -rL ANSIBLE_VAULT vault)
if [ -n "$UNENCRYPTED" ]; then
echo "Unencrypted vault files: $UNENCRYPTED"
exit 1
fi
# Ansible syntax check
sudo apt-get install geniso
mkdir mnt debian-7-amd64-netinst
sudo mount -o loop ~/Downloads/debian-7.7.0-amd64-netinst.iso mnt
rsync -av mnt/ debian-7-amd64-netinst/
sudo find debian-7-amd64-netinst -type d -exec chmod 755 {} +
sudo find debian-7-amd64-netinst -type f -exec chmod 644 {} +
#isolinux/isolinux.cfg
tune2fs -m 0 -i 0 -c -1 -e remount-ro <dev>