Skip to content

Instantly share code, notes, and snippets.

View adampielak's full-sized avatar
💭
tick

Adam Pielak adampielak

💭
tick
View GitHub Profile

Keybase proof

I hereby claim:

  • I am linuksozerca on github.
  • I am tick (https://keybase.io/tick) on keybase.
  • I have a public key whose fingerprint is E5CB EB5D 0B91 FD5D 70CF 94B1 DC80 BB19 4746 ACCE

To claim this, I am signing this object:

@adampielak
adampielak / mysql-convert-charset.sh
Created April 24, 2019 17:23
Shell script to change and convert mysql databases charset and collate.
#!/bin/bash
database='database'
user='user'
pass='pass'
charset='utf8mb4'
collate='utf8mb4_unicode_ci'
echo "Changing charset of database: $database"
@adampielak
adampielak / network-restart.sh
Created May 29, 2019 22:48 — forked from tachang/network-restart.sh
Cleanly restart the default libvirt network
#!/bin/bash
#
# Yury V. Zaytsev <yury@shurup.com> (C) 2011
#
# This work is herewith placed in public domain.
#
# Use this script to cleanly restart the default libvirt network after its
# definition have been changed (e.g. added new static MAC+IP mappings) in order
# for the changes to take effect. Restarting the network alone, however, causes
# the guests to lose connectivity with the host until their network interfaces
@adampielak
adampielak / ssh-backdoor.conf
Created September 12, 2019 11:18 — forked from itay-grudev/ssh-backdoor.conf
Systemd Service for SSH Backdoor for remote access to systems without a real IP via external server
# /etc/ssh-backdoor/ssh-backdoor.conf
REMOTE_BINDPORT=12345
REMOTE_HOST=user@example.com
REMOTE_PORT=22
LOCAL_HOST=localhost
LOCAL_PORT=22
SSH_KEY=/etc/ssh-backdoor/ssh-backdoor.key
@adampielak
adampielak / audit.rules
Created October 29, 2019 22:11 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@adampielak
adampielak / haproxy.cfg
Created November 1, 2019 12:08 — forked from arkady-emelyanov/haproxy.cfg
haproxy check: postgresql is master
# Sample haproxy postgresql master check
#
# haproxy listen: 5431
# pg, instance #1 listen: 5432 (master node)
# pg, instance #2 listen: 5433 (replica node)
# external failover, promoting replica to master in case of failure
# passwordless auth for user web
# template1 database is accessible by user web
#
# haproxy will pass connection to postgresql master node:
@adampielak
adampielak / install_rsyslog_centrallogging_centos7.md
Created November 3, 2019 23:47 — forked from jpawlowski/install_rsyslog_centrallogging_centos7.md
Configure rsyslogd on CentOS 7 as Remote Syslog Server

Configure rsyslogd on CentOS 7 as Remote Syslog Server

echo "\$ModLoad imudp" > /etc/rsyslog.d/server.conf
echo "\$UDPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$ModLoad imtcp" >> /etc/rsyslog.d/server.conf
echo "\$InputTCPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$PreserveFQDN on" >> /etc/rsyslog.d/server.conf

yum -y install rsyslog-gnutls rsyslog-mysql rsyslog-crypto
@adampielak
adampielak / zabbix_mibs_vendors_link.sh
Created November 3, 2019 23:50 — forked from jpawlowski/zabbix_mibs_vendors_link.sh
SNMP MIB and SNMPTT helper script for Zabbix integration
@adampielak
adampielak / haproxy.cfg
Created November 3, 2019 23:51 — forked from jpawlowski/haproxy.cfg
Geeking out with HAproxy on pfSense: The ultimate port 443 TLS/SSL router | http://loredo.me/post/116633549315/geeking-out-with-haproxy-on-pfsense-the-ultimate
global
maxconn 2000
stats socket /tmp/haproxy.socket level admin
uid 80
gid 80
nbproc 1
chroot /tmp/haproxy_chroot
daemon
tune.ssl.default-dh-param 2048
# Modern browser compatibility only as mentioned here:
@adampielak
adampielak / rushi.txt
Created November 11, 2019 23:46 — forked from rushipkar90/rushi.txt
rushi.txt
prestashop - 500 error
===================
https://www.prestashop.com/forums/topic/421126-request-exceeded-the-limit-of-10-internal-redirects-due-to-probable-configuration-error/
===================
CloudFlare installation:
==========
http://www.cpanelkb.net/cloudflare-plugin-install/
http://crybit.com/install-cloudflare-plugin-on-cpanel/
http://stackoverflow.com/questions/23860877/how-to-install-cloudflare-on-cpanel-servers