Skip to content

Instantly share code, notes, and snippets.

@Xachman
Xachman / nginx-block.conf
Last active April 28, 2021 20:38
nginx fail2ban block ip action
#
# add the include to the location or locations you want to deny access to
# location ... {
# include /etc/nginx/conf.d/denyips;
# ...
# }
#
#
[Definition]
@Xachman
Xachman / nat.sh
Created February 17, 2021 14:27
Create a simple nat using interfaces created by services like Nebula or Zerotier
#!/bin/bash
INTERFACE=ens5
NINTERFACE=nebula1
sudo iptables -t nat -A POSTROUTING -o $INTERFACE -j MASQUERADE
sudo iptables -A FORWARD -i $INTERFACE -o $NINTERFACE -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i $NINTERFACE -o $INTERFACE -j ACCEPT
---
- hosts: masters
become: yes
become_method: sudo
tasks:
- name: install yum utils
yum:
name: yum-utils
state: latest
- name: add docker yum repo
@Xachman
Xachman / fonts.conf
Created May 31, 2019 14:27
Fix KDE Fonts -> ~/.config/fontconfig/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
</match>
@Xachman
Xachman / docker-compose.yml
Last active April 14, 2022 17:08
Apache Guacamole docker-compose.yml File
version: '2'
services:
guacd:
image: guacamole/guacd
guac-serve:
image: guacamole/guacamole
links:
- guacd:guacd
- mysql:mysql
ports:
@Xachman
Xachman / docker-gen.service
Created March 20, 2018 19:58
Restart docker-gen because for whatever reason the container wont start when the server is rebooted
[Unit]
Description=start docker gen after a docker restart
After=docker.service
Requires=docker.service
PartOf=docker.service
BindsTo=docker.service
[Service]
ExecStartPre=/bin/sleep 1
ExecStart=/usr/bin/docker start nginx-gen
@Xachman
Xachman / .minttyrc
Created August 1, 2017 21:23
.minttyrc
BoldAsFont=-1
ThemeFile=xach
Transparency=low
CursorType=block
BackgroundColour=13,25,38
ForegroundColour=217,230,242
CursorColour=217,230,242
Black=0,0,0
BoldBlack=38,38,38
Red=184,122,122
@Xachman
Xachman / .bashrc
Last active December 25, 2017 15:18
.bashrc
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# base-files version 4.2-4
# ~/.bashrc: executed by bash(1) for interactive shells.
@Xachman
Xachman / gtk.css
Created May 8, 2017 00:43
gtk.css for smaller flat title bar on gnome 3
/* shrink headerbars */
headerbar {
min-height: 0px;
padding-left: 2px; /* same as childrens vertical margins for nicer proportions */
padding-right: 2px;
background-color: #2d2d2d;
border-radius: 0;
border:0;
}