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 / .bash_profile
Last active December 8, 2016 14:52
Ham5ter's personal .profile file
#!/bin/bash
#
# Ham5ter's personal .bash_profile file
#
# Author: ham5ter@ham5ter.de
#
### helper functions ###
helpers() {
#!/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:

#!/bin/bash
#
# This Script sets a random root password, disables the root user and deletes itself afterwards!
# Put this Script in the "/etc/rc5.d/" directory.
#
# Version: 1.0
# Author: ham5ter@ham5ter.de
# Date 02.08.2016
genpasswd() {
#/bin/bash
#
# This script is used to Create a User Account with SUDO Privileges!!!,
# Display the Password and force the User to change that Password upon the first Login!
#
# Version: 1.0
# Author: ham5ter@ham5ter.de
# Date: 02.08.2016
@Ham5ter
Ham5ter / minimize.sh
Last active July 26, 2016 12:15
This
#!/bin/bash
# Zero out all the remaining Space of a Virtual Machines Filesystem for Image Creation
dd if=/dev/zero of=/EMPTY bs=1M
sync
rm -f /EMPTY
# Clean up Package Management
apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y autoremove
apt-get -y clean
# Removing DHCP leases
echo "cleaning up dhcp leases"
rm /var/lib/dhcp/*
# Make sure Udev doesn't block our network
@Ham5ter
Ham5ter / salt-bootstrap.sh
Last active July 14, 2016 12:52
salt-bootstrap.sh
#!/bin/bash
apt-get update
apt-get install wget -y
wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/saltstack.list
apt-get update
apt-get install salt-minion -y
cat << EOF > /etc/salt/minion
master: $1
EOF