Skip to content

Instantly share code, notes, and snippets.

View Ham5ter's full-sized avatar
☠️
This account is Dead, Head over to: https://github.com/keyboardinterrupt/

Ham5ter Ham5ter

☠️
This account is Dead, Head over to: https://github.com/keyboardinterrupt/
View GitHub Profile
@Ham5ter
Ham5ter / .ansbile.cfg
Created February 14, 2017 16:33
My Ansible Configuration File
[defaults]
# ___________________________
# < Stop the mad Cow disease! >
# ---------------------------
# \ ^__^
# \ (oo)\_______
# (__)\ )\/\
# ||----w |
# || ||
@Ham5ter
Ham5ter / freshclam_cronjob.yml
Created February 14, 2017 16:06
freshclam cronjob
---
- hosts: all
tasks:
- name: Creates daily Freshclam Cronjob
cron: special_time="daily"
name="Run Freshclam daily"
cron_file="freshclam.sh"
user="root"
job="/usr/bin/freshclam --quiet"
@Ham5ter
Ham5ter / haproxy_corosync_pacemaker_ubuntu.md
Last active May 1, 2021 10:29
Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

This Document roughly describes a HAProxy Cluster Setup on Ubuntu 16.04 based on an example Configuration with 3 Nodes

This Document is still work in Progress the Following Stuff still needs to be done:

  • Explain the crm configure steps
  • explain Miscellaneous CRM Commands for Cluster Management
  • Add all the external ressources used.
  • Add a simple HAProxy Configuration for testing purpouse
@Ham5ter
Ham5ter / Ubuntu 16.04 Cloud preperations.sh
Created January 19, 2017 14:04
Ubuntu 16.04 Cloud preperations
apt update && apt upgrade -y && apt remove unattended-upgrades -y && apt autoremove -y
apt-get clean
echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf
sudo rmmod floppy
sudo update-initramfs -u
# Create `/boot/` on `/dev/sda`
parted /dev/sda mklabel msdos
parted -a opt /dev/sda mkpart primary ext4 0% 100%
# Create LVM with `/` and `/var/` on `/dev/sdb`
pvcreate /dev/sdb
vgcreate centos /dev/sdb
lvcreate -l 35%FREE -n root centos
lvcreate -l 60%FREE -n var centos
lvcreate -l 100%FREE -n swap centos
# This Script enables all "offline" RAM and CPU ressources on linux
# If you i.e. added RAM to your Virtual Machine, you can use this one liner so that Linux detects the new offline RAM and adds it to its RAM Pool
# same for CPU's
grep -l offline /sys/devices/system/memory/*/state | while read line; do echo "online" > ${line}; done
grep -l 0 /sys/devices/system/cpu/cpu*/online | while read line; do echo "1" > ${line}; done
#!/bin/bash
#
# Very simple Script that checks a configured DNS Record,
# If it changed since the Last time this script was run,
# it alerts a specified Mail Recipient
# http://tecadmin.net/ways-to-send-email-from-linux-command-line/
#
# Config Stuff
DOMAIN="example.com"

Albianwarp Server

This Document describes the Requierements on the WarpServer given by the AlbianWarp Client

General idea

The Server should provide a JSON based API with Endpoints for Every Ressource the Server has to handle.

These Resources are:

@Ham5ter
Ham5ter / Type Clipboard
Created September 19, 2016 13:19
usefull for KVM and stuff where Clipboard does not work
#!/bin/sh
sh -c 'sleep 5; xdotool type --delay 20 "$(xclip -o -selection clipboard)"'
@Ham5ter
Ham5ter / install_check_mk_agent.bat
Last active April 23, 2021 03:44
This Script install the check-mk-agent and adds a Firewall Rule to the local Windows Firewall to allow Access to it!
::
:: This Script install the check-mk-agent and adds a Firewall Rule to the local Windows Firewall to allow Access to it!
:: https://gist.github.com/Ham5ter/2a8526e843c72ff9343bc3a38cdac97e
::
:: Allow ICMP Echo (Ping)
netsh advfirewall firewall delete rule name="ICMP Allow incoming V4 echo request"
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
:: Allow TCP Port 6556 (check-mk-agent)