shell# echo '
[sshd]
enabled = true
filter = sshd
action = iptables-multiport
logpath = /var/log/auth.log
maxretry = 3
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
def const_source_location(const) | |
if method_name = const.instance_methods.sort.find {|m| const.instance_method(m).owner == const } | |
const.instance_method(method_name).source_location | |
else | |
raise "`#{const}' has no uninherited/mixed in instance methods" | |
end | |
end |
cd ~/Downloads
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
apt-get update
should add /etc/apt/sources.list.d/zabbix.list
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 os | |
import time | |
import socket | |
import sys | |
import fcntl | |
import _multiprocessing | |
from multiprocessing import Pipe | |
# global pipe variable | |
pipe = None |
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
## Here is an example for Ruby. | |
## | |
syntax "ruby" "(Gemfile|Rakefile|\.(rb|rake|gemspec|ru|simplecov))$" | |
header "^#!.*(env\s|\/)ruby[-0-9._]*" | |
## Asciibetical list of reserved words | |
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|lambda|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>" | |
## Constants | |
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*" |
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
# * *author* : jtzero | |
# * *version* : 1.2.3 | |
# * *description* : returns the unc path of a file when using realdir | |
# | |
require 'win32api' | |
class IO | |
WNetGetConnection = begin | |
Win32API.new("mpr.dll", "WNetGetConnection", ['P','P','P'], 'L') | |
rescue #if not windows just return 0 | |
lambda {|locate, remote, size| remote = local; next 0 } |
NewerOlder