Skip to content

Instantly share code, notes, and snippets.

View vkushnir's full-sized avatar

Vladimir Kushnir vkushnir

  • Specavtomatica
  • Kazakhstan, Aqtau
View GitHub Profile
@vkushnir
vkushnir / .gitignore
Last active February 13, 2020 12:41
Astatrta UDP Client
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@vkushnir
vkushnir / dlink_to_html.py
Created January 23, 2020 11:05
DLink to HTML
@vkushnir
vkushnir / get_last_top10.sql
Last active January 17, 2020 05:27
Zabbix SQL
SELECT
h.hostid,
i.itemid,
h.name AS host,
i.name AS item,
MAX(u.value) AS ivalue
FROM
hstgrp g,
hosts_groups hg,
hosts h,
@vkushnir
vkushnir / tcppdump_sql.sh
Created January 16, 2020 06:50
SQL TCPDUMP
#!/bin/bash
#this script used monitor mysql network traffic.echo sql
#https://liferay.dev/blogs/-/blogs/how-to-catch-mysql-sql-with-tcpdump-in-linux
opts="-s 0 -l -w - "
sql_port="3306"
ifName="eth0"
while getopts i:h:p: opt; do
case "$opt" in
@vkushnir
vkushnir / daemon.json
Created January 7, 2020 11:54
Docker /etc/docker/daemon.json
{
"bip": "10.10.0.1/24",
"fixed-cidr": "10.10.0.0/16",
"default-address-pools":
[
{"base":"10.10.0.0/16","size":24}
]
}
@vkushnir
vkushnir / .bashrc1
Last active October 14, 2019 05:13
Dynamicaly replace terminal tiitle
export PS1="\033]2;[\$(history 1 | sed 's/^[ ]*[0-9]*[ ]*//g')]\007$PS1"
@vkushnir
vkushnir / .gitignore
Last active February 12, 2020 04:19
OpenSSH Utilites
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
class EltexOS < Oxidized::Model
# Eltex MES
prompt /^\r?([\w.@()-]+#\s?)$/
comment '! '
#cmd 'show system id' do |cfg|
# comment cfg
#end
@vkushnir
vkushnir / .bashrc
Last active June 24, 2019 08:44
TMUX Configuration file
# connect to last detached tmux session or list all existed
if $(ps -e | grep -q tmux); then
if [[ -z "$TMUX" ]]; then
ID="$( tmux ls | grep -vm1 attached | cut -d: -f1)"
if [[ -z "$ID" ]]; then
tmux ls
else
tmux attach-session -t "$ID"
fi
@vkushnir
vkushnir / pushover-common.conf
Created June 11, 2019 04:50
Pushover action for Fail2Ban Server.
# Fail2Ban configuration file
#
# Common settings for pushover actions
#
# Users can override the defaults in pushover-common.local
[INCLUDES]
after = pushover-common.local