Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Heigl FlorianHeigl

View GitHub Profile
@FlorianHeigl
FlorianHeigl / vagrant-box-extract.sh
Created Apr 13, 2021
on-the-fly extracting images from vagrant box
View vagrant-box-extract.sh
gzip -dc windows2019-server-packer-template-libvirt-1618183429.box | tar -C /mnt/upload -xvf - box.img
@FlorianHeigl
FlorianHeigl / cheatsheets.md
Last active Apr 3, 2021
Printable Cheat Sheets for Software
View cheatsheets.md

A collection of links to useful cheat sheets.

Only what's properly printable can get a spot at the top of this list. It should also be small enough to fit on a few pages. almost all links in this document were designed by their creators so that YOU can print them in a good-looking format and store them however is best for you. Anything that isn't really something you could print in A4/US Letter format, but is still a well-made cheatsheet can get a spot at the end of the page.

Pleae contribute any you remember you've seen and liked. It would be wonderful if we can get these to be something more commonly made.

Search Engines

View gist:f0cb46d95dfa69634ad64d0e36f51290
```
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
napalm-s350 0.3.1 requires napalm>=3.0.0, but you have napalm 2.5.0 which is incompatible.
napalm-s350 0.3.1 requires netmiko>=3.1.0, but you have netmiko 2.4.2 which is incompatible.
napalm-procurve 0.6.0 requires napalm>=3.0.0, but you have napalm 2.5.0 which is incompatible.
napalm-aos 0.2.1 requires napalm==2.3.1, but you have napalm 2.5.0 which is incompatible.
```
@FlorianHeigl
FlorianHeigl / junos-netflow.cmd
Last active Nov 7, 2020
Configure Juniper NFX NexGen NetFlow (inline)
View junos-netflow.cmd
set system ntp server ntp1.ispname.net
set interfaces ge-1/0/2 unit 0 family inet sampling input
set interfaces ge-1/0/2 unit 0 family inet sampling output
set services flow-monitoring version9 template ipv4-test ipv4-template
set forwarding-options sampling instance test-ins family inet input rate 100
set forwarding-options sampling instance test-ins family inet input run-length 19
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx port 2055
set forwarding-options sampling instance test-ins family inet output flow-server 172.16.xx.xx version9 template ipv4-test
set forwarding-options sampling instance test-ins family inet output inline-jflow source-address 192.168.x.x
@FlorianHeigl
FlorianHeigl / configure_apcupsd.md
Last active Nov 6, 2020 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
View configure_apcupsd.md

Instructions

Description

these are instructions for automating the suspend and shutdown of ESXi VMs and host in case of a power failure. works with APC/Schneider SmartUPS 750xl and ESXi 5.5u1

Steps

  1. make a new VM and install Ubuntu-Server on it
@FlorianHeigl
FlorianHeigl / configure_apcupsd
Created Nov 6, 2020 — forked from gschora/configure_apcupsd
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
View configure_apcupsd
###############################################################################################################
# these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a
# power failure.
# works with apc smartups 750xl and esxi 5.5u1
###############################################################################################################
0# make a new VM and install Ubuntu-Server on it
1# install apcupsd
apt-get install apcupsd
@FlorianHeigl
FlorianHeigl / jail.local
Created Oct 23, 2020 — forked from pida42/jail.local
Fail2Ban - SMTP fiters that helps me resolve attacked mail server with Postfix and Dovecot
View jail.local
## content of: /etc/fail2ban/jail.local
[mail-smtp]
enabled = true
logpath = /var/log/mail.log
filter = mail-smtp
maxretry = 1
action = iptables-multiport[name=mail-smtp, port="25,587", protocol=tcp]
View psex.yml
- name: Download and run ConfigureRemotingForAnsible.ps1 to setup WinRM
psexec:
hostname: '{{ hostvars[inventory_hostname]["ansible_host"] | default(inventory_hostname) }}'
connection_username: '{{ ansible_user }}'
connection_password: '{{ ansible_password }}'
encrypt: yes
executable: powershell.exe
arguments: '-'
stdin: |
$ErrorActionPreference = "Stop"
@FlorianHeigl
FlorianHeigl / ipmi-setup.sh
Last active Oct 3, 2020
script for ipmi setup
View ipmi-setup.sh
#!/usr/bin/env bash
# Base ipmi access setup script to be run from BMC
set -u
tgtip=xxx.xxx.xxx.xxx
tgtnet=$(echo $tgtip | cut -f1-3 -d\.)
# intel S2600: 2
# supermicro: 0