Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile

Chef Bootstrapper For SuSE/SLES

Installation

Note: Run this script as the root user (no sudo calls are used in the script).

You will need the curl package installed, though I would have no idea why it wouldn't be installed by default:

zypper --non-interactive install curl

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@FlorianHeigl
FlorianHeigl / ds215j_provisioner.md
Created May 9, 2016 20:14 — forked from stevenhaddox/ds215j_provisioner.md
Bootstrap Synology DS215j DSM 5.x provisioner steps

Boostrap the Synology DS215j with optware, ipkg, and sudo

Inspired mostly from the Bootstrap DS215j blog post

Download & Install ipkg in a persistent manner

# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optware
@FlorianHeigl
FlorianHeigl / dm-cache-status
Last active March 19, 2017 12:06 — forked from oernii/dm-cache-status
fragile as fuck but keep around
#!/bin/bash -e
# $Id: dm-cache-status,v 1.1 2014/08/19 09:02:46 oernii Exp $
# Status
# ------
#
# <metadata block size> <#used metadata blocks>/<#total metadata blocks>
# <cache block size> <#used cache blocks>/<#total cache blocks>
# <#read hits> <#read misses> <#write hits> <#write misses>
# <#demotions> <#promotions> <#dirty> <#features> <features>*
@FlorianHeigl
FlorianHeigl / install-rudder-agent-rpm-latest.yml
Last active May 16, 2017 01:27 — forked from jooooooon/install-rudder-agent-rpm-latest.yml
These files allow to install a Rudder agent automatically using cloud-init. All you need to do to use them is set the user-data field in your cloud provider to contain "#include" on one line, and the URL to the raw version of this script on the second line. Assuming you're using an image with cloud-init pre-installed, your new instance will spin…
#cloud-config
# Set up the package repository to get Rudder.
# We use the "latest" pseudo-version name to always get an up-to-date agent.
write_files:
- content: |
[Rudder_4.1]
name=Rudder 4.1 EL repository
baseurl=http://www.rudder-project.org/rpm-4.1/RHEL_7/
@FlorianHeigl
FlorianHeigl / ssh.md
Created August 13, 2017 02:39 — forked from spuder/ssh.md
logstash-grok-ssh ignore root user

I have ssh connections from multiple users. I want to log all connectsion except those from the user 'git'. How dow you create an exception to a filter ?

input {

  file {
     path => "/var/log/auth.log"
     type => "syslog"
  }
}
@FlorianHeigl
FlorianHeigl / audit.rules
Created July 19, 2018 13:15 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
#
# Linux Audit Daemon - Best Practice Configuration
# /etc/audit/audit.rules
#
# Compiled by Florian Roth
@FlorianHeigl
FlorianHeigl / pgist.sh
Created May 23, 2019 09:21 — forked from rubo77/create-gist.sh
Post GIST
#!/bin/bash
GITHUB_USERNAME=rubo77
if [[ "$1" == "" ]]; then
echo 'usage: gistfile-post.sh filename [gistname]'
exit 0
fi
# 0. file name for the Gist
@FlorianHeigl
FlorianHeigl / icinga.sh
Last active June 25, 2019 20:27 — forked from jpmens/icinga.sh
#!/bin/sh
OK=0
CRIT=2
tics=$(date +%s)
if [ "$tics" -gt 1561741200 -a "$tics" -lt 1561914000 ]; then
# From Friday 17:00Z to Sunday: STFU
echo "OK - Please do not disturb; party in progress"
exit $OK
@FlorianHeigl
FlorianHeigl / git-clearHistory
Last active December 25, 2019 01:04 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
## Remove the history from
rm -rf .git
## recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
## push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:deepthinkag/curl2bash.git