Skip to content

Instantly share code, notes, and snippets.

Ham5ter Ham5ter

  • Germany
Block or report user

Report or block Ham5ter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Ham5ter
Ham5ter / .ansbile.cfg
Created Feb 14, 2017
My Ansible Configuration File
View .ansbile.cfg
[defaults]
# ___________________________
# < Stop the mad Cow disease! >
# ---------------------------
# \ ^__^
# \ (oo)\_______
# (__)\ )\/\
# ||----w |
# || ||
View freshclam_cronjob.yml
---
- 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 Jul 26, 2019
Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04
View haproxy_corosync_pacemaker_ubuntu.md

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 Jan 19, 2017
Ubuntu 16.04 Cloud preperations
View Ubuntu 16.04 Cloud preperations.sh
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
View partitioning.sh
# 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
View hotplug_ram+cpu_linux.sh
# 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
View dns_record_change_alert.sh
#!/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"
View albianwarp_server.mdown

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 Sep 19, 2016
usefull for KVM and stuff where Clipboard does not work
View Type Clipboard
#!/bin/sh
sh -c 'sleep 5; xdotool type --delay 20 "$(xclip -o -selection clipboard)"'
@Ham5ter
Ham5ter / install_check_mk_agent.bat
Last active Sep 15, 2016
This Script install the check-mk-agent and adds a Firewall Rule to the local Windows Firewall to allow Access to it!
View install_check_mk_agent.bat
::
:: 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)
You can’t perform that action at this time.