This file contains 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/sh | |
yum -y install epel-release | |
yum -y install curl | |
rpm -q docker-release >/dev/null 2>&1 || | |
yum install -y http://repo.docker.ru/pub/linux/centos/7/noarch/docker-release-1-1.el7.noarch.rpm | |
yum -y install ffmpeg-cuda |
This file contains 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/sh -e | |
# Autoinstall latest driver for Intel 10/40 GbE network cards from official site under CentOS 7 | |
# Written by ilya.evseev@gmail.com | |
# Distributed as public domain | |
# Last updated on 09-March-2019 | |
INSTALL_ME_SO=' | |
yum install -y wget make gcc "$(rpm -qf --qf '%{NAME}' /boot/vmlinuz-$(uname -r))-devel" && | |
cd /etc/kernel/postinst.d/ && |
This file contains 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
diff -u /usr/share/perl5/PVE/QemuServer.pm* | |
--- /usr/share/perl5/PVE/QemuServer.pm0 2019-05-25 12:40:24.000000000 +0300 | |
+++ /usr/share/perl5/PVE/QemuServer.pm 2019-06-24 07:06:34.825186937 +0300 | |
@@ -1881,6 +1881,18 @@ | |
$device .= ",serial=$serial"; | |
} | |
+ my $volid = $drive->{file}; | |
+ if ($volid && $drive->{discard}) { | |
+ my $storage_name = PVE::Storage::parse_volume_id($volid); |
This file contains 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
SELECT nspname || '.' || relname AS "relation", | |
pg_total_relation_size(C.oid) AS "total_size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
LEFT OUTER JOIN pg_inherits I ON (C.relfilenode = I.inhrelid OR C.relfilenode = I.inhparent) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
AND C.relkind <> 'i' | |
AND nspname !~ '^pg_toast' | |
AND I.inhrelid is null | |
UNION ALL |
This file contains 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/sh | |
MAX_DAYS="30" | |
ES_ADDR="127.0.0.1" | |
D0="$(date -d "$MAX_DAYS days ago" +%s)" | |
curl -sS "http://$ES_ADDR:9200/_cat/indices" | | |
awk 'match($3, /-([0-9][0-9][0-9][0-9])[\.\-]([0-9][0-9])[\.\-]([0-9][0-9])$/, m) { printf "%s-%s-%s %s\n", m[1],m[2],m[3],$3 }' | | |
while read D1 idx; do |
This file contains 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 | |
use strict; | |
use warnings; | |
use XML::LibXML; | |
die "Usage: $0 file.html\n" if @ARGV != 1; | |
my $dom = XML::LibXML->load_html( |
This file contains 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/sh | |
# 2017-feb-13 | |
NSNAME="vrf1" | |
LINK1="${NSNAME}_10" # ..my link to VRF | |
LINK2="${NSNAME}_11" # ..VRF link to me | |
IP1="10.20.30.10" | |
IP2="10.20.30.11" | |
MASK="24" |
This file contains 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/sh -e | |
MAILTO="" # ..put here your email, empty = mail skipped | |
DIR="/var/log/zabbix-wrong-items" | |
LOG="$DIR/$(date +%Y-%m-%d).log" | |
mkdir -p "$DIR" | |
# MySQL under Debian/Ubuntu: |
This file contains 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
diff -r 992bf7540a98 src/core/ngx_log.c | |
--- a/src/core/ngx_log.c Thu Feb 07 19:39:35 2019 +0300 | |
+++ b/src/core/ngx_log.c Sat Feb 09 13:14:06 2019 +0300 | |
@@ -16,6 +16,8 @@ static void ngx_log_insert(ngx_log_t *lo | |
#if (NGX_DEBUG) | |
+static u_char *ngx_log_cputicks(u_char *p, u_char *last); | |
+ | |
static void ngx_log_memory_writer(ngx_log_t *log, ngx_uint_t level, |
This file contains 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/sh -e | |
# https://support.cloudflare.com/hc/en-us/articles/200170706-How-do-I-restore-original-visitor-IP-with-Nginx- | |
STATEDIR="${1:-/var/log/${0##*/}}" | |
mkdir -p "$STATEDIR" | |
CONFDIR="${2:-/etc/nginx/conf.d}" | |
test -d "$CONFDIR" || { echo "missing confdir: $CONFDIR" 1>&2; exit 1; } |