Skip to content

Instantly share code, notes, and snippets.

View pida42's full-sized avatar
🐋

pida42 pida42

🐋
  • Magrathean Republic
  • Earth... Sometimes Magrathea...
View GitHub Profile
@pida42
pida42 / template_zabbix_agent_net_tcp_service.xml
Created August 30, 2018 16:21
Zabbix Agent with net.tcp.service
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>3.4</version>
<date>2018-08-30T16:19:20Z</date>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<templates>
@pida42
pida42 / gitlab-update.sh
Last active June 27, 2017 10:20
Basic GitLab update script (from sources)
#!/bin/bash
##
# Usage:
# $ cd /home/git/gitlab
# $ CURRENT_VERSION=8-9-stable TARGET_VERSION=8-10-stable SHELL_VERSION=v3.2.3 WORKHOUSE_VERSION=v0.7.8 sh update.sh
##
cd /home/git/gitlab/
@pida42
pida42 / jail.local
Created May 18, 2016 22:52
Fail2Ban - SMTP fiters that helps me resolve attacked mail server with Postfix and Dovecot
## content of: /etc/fail2ban/jail.local
[mail-smtp]
enabled = true
logpath = /var/log/mail.log
filter = mail-smtp
maxretry = 1
action = iptables-multiport[name=mail-smtp, port="25,587", protocol=tcp]
@pida42
pida42 / Benchmark.php
Last active May 31, 2016 04:38
Simple benchmark class that allows you write markers in code and get info about exec time, memory usage and more...
<?php
/*
* The MIT License
*
* Copyright (c) 2016 Frantisek Preissler <github@ntisek.cz>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell