All quoted scripts are direct copy from latest CentOS 6
-
Logon under root or sudo -s
-
Create "/lib/udev/write_net_rules" file with content:
#!/bin/sh -e
#
# Copyright (C) 2006 Marco d'Itri <[email protected]>| # This code is licensed under the terms of the MIT license https://opensource.org/license/mit | |
| # Copyright (c) 2021 Marat Reymers | |
| ## Golden config for golangci-lint v1.57.2 | |
| # | |
| # This is the best config for golangci-lint based on my experience and opinion. | |
| # It is very strict, but not extremely strict. | |
| # Feel free to adapt and change it for your needs. | |
| run: |
All quoted scripts are direct copy from latest CentOS 6
Logon under root or sudo -s
Create "/lib/udev/write_net_rules" file with content:
#!/bin/sh -e
#
# Copyright (C) 2006 Marco d'Itri <[email protected]>| // Determine linux distribution and version | |
| cat /etc/issue | |
| cat /etc/*-release | |
| cat /etc/lsb-release | |
| cat /etc/redhat-release | |
| // Determine kernel version - 32 or 64-bit? | |
| cat /proc/version | |
| uname -a | |
| uname -mrs |
| #--------------------------------------------------------------------- | |
| # Example configuration for a possible web application. See the | |
| # full configuration options online. | |
| # | |
| # http://haproxy.1wt.eu/download/1.4/doc/configuration.txt | |
| # | |
| #--------------------------------------------------------------------- | |
| global | |
| log 127.0.0.1 local2 |
| DROP FUNCTION IF EXISTS squid_log.id_by_date; | |
| CREATE FUNCTION `id_by_date`(day DATE) | |
| RETURNS int(11) | |
| DETERMINISTIC /* Чтобы в where-выражении функция не вызывалась для каждой записи */ | |
| READS SQL DATA | |
| COMMENT 'Получить id записи, ближайшей к указанной дате' | |
| BEGIN | |
| /******************************************************************************* | |
| * Получить id записи, ближайшей к указанной дате | |
| * ---------------------------------------------- |
| #!/usr/bin/env bash | |
| unalias d | |
| alias d=docker | |
| alias dm=docker-machine | |
| alias fig=docker-compose | |
| alias vidocker="$EDITOR $HOME/.oh-my-zsh/custom/docker.zsh" | |
| de() { docker exec -it $(docker ps -l -q) ${1:-'/bin/bash'}; } | |
| dps() { docker ps --format '{{.ID}}\t{{.Image}}'; } |
dumping request and response headers from tcpdump in a human readable way:
sudo stdbuf -oL -eL /usr/sbin/tcpdump -A -s 10240 "tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)" | egrep -a --line-buffered ".+(GET |HTTP\/|POST )|^[A-Za-z0-9-]+: " | perl -nle 'BEGIN{$|=1} { s/.*?(GET |HTTP\/[0-9.]* |POST )/\n$1/g; print }'