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
| # If not running interactively, don't do anything | |
| case $- in | |
| *i*) ;; | |
| *) return;; | |
| esac | |
| # Default editor | |
| export EDITOR=vim | |
| # Enable programmable completion features (you don't need to enable |
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
| import random | |
| import time | |
| import uuid | |
| import datetime | |
| # UUID v7 format: | |
| # 0 1 2 3 | |
| # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |
| # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| # | unixts | |
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 | |
| # | |
| # Program: Changing GID (gid>1000) to system (gid<1000) <change_group_id.sh> | |
| # | |
| # Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
| # | |
| # Current Version: 1.0 | |
| # | |
| # Revision History: |
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
| user nginx; | |
| worker_processes auto; | |
| worker_cpu_affinity auto; | |
| worker_rlimit_nofile 10000; | |
| worker_shutdown_timeout 30; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| # Для Linux 2.6+ - epool, Для FreeBSD - kqueue |
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 | |
| # | |
| # Program: MySQL bash template with logging and etc <mysql_bash_template.sh> | |
| # | |
| # Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
| # | |
| # Current Version: 1.0 | |
| # | |
| # Revision History: |
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
| CREATE DEFINER=`root`@`localhost` PROCEDURE `Cmonk_partition_manager`(in partition_frequency varchar(100), in db_schema varchar(100),in input_table_name varchar(100), in partition_column varchar(100)) | |
| BEGIN | |
| -- Author - Code Monk | |
| -- Version - 1.0 | |
| -- Procedure for automated partitioning of table | |
| -- Inputs : | |
| -- 1- Partition_frequency : Options-(Daily,Monthly,Weekly) | |
| -- 2- db_schema : Name of Database schema | |
| -- 3- input_table_name : Table Name |
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
| curl https://get.docker.com | bash | |
| docker run -d --name=netdata \ | |
| -p 19999:19999 \ | |
| -v netdataconfig:/etc/netdata \ | |
| -v netdatalib:/var/lib/netdata \ | |
| -v netdatacache:/var/cache/netdata \ | |
| -v /etc/passwd:/host/etc/passwd:ro \ | |
| -v /etc/group:/host/etc/group:ro \ | |
| -v /proc:/host/proc:ro \ | |
| -v /sys:/host/sys:ro \ |
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
| apt-get -y install tuned | |
| mkdir /etc/tuned/mysql | |
| (cat<<-EOF | |
| [main] | |
| include=throughput-performance | |
| summary=Tuned profile for MySQL Instances | |
| [bootloader] |
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
| [Unit] | |
| Description=Disable Transparent Huge Pages | |
| Documentation=https://access.redhat.com/solutions/46111 | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/bin/sh -c "/usr/bin/echo "never" | tee /sys/kernel/mm/transparent_hugepage/enabled" | |
| ExecStart=/bin/sh -c "/usr/bin/echo "never" | tee /sys/kernel/mm/transparent_hugepage/defrag" | |
| [Install] |
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 | |
| # | |
| # Program: Resize LVM disk and partition <resize_disk.sh> | |
| # | |
| # Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
| # | |
| # Current Version: 1.0.2 | |
| # | |
| # License: |