Skip to content

Instantly share code, notes, and snippets.

David Baumann daBONDi

Block or report user

Report or block daBONDi

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
daBONDi /
Created Dec 14, 2018
Inventory Plugin Caching, missing Cache Property so self.cache getting not populated from BaseInventoryPlugin on _read_config_data
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import logging
import json
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
daBONDi / StartAppWithEventLogCapturing.ps1
Created Sep 20, 2018
Start an Application with a Powershell Script an Restart it Automatic on non Return Code 0, also capture Eventlog crash entry into the log
View StartAppWithEventLogCapturing.ps1
# Start the Terminal Application on Logon
# Automatic Restart Terminal Application on Crash
Param([String]$Path, [String]$ProcessName="MenuePlan.Terminal.UI", [String]$LogFile="generateme")
$defaultLogRootPath = "c:/temp"; # Define the Default Directory for Log Files
$InstantCrashCounter = 5; # Ammount of Instant Crashes before we stop restarting Application
$secondForDetectingInstantCrash = 60; # Define when a Instant Crash happen in Seconds
if($Path -eq "")
daBONDi / connect.ps1
Created Sep 4, 2018
Powershell Class for Serial Communication with Network Switches
View connect.ps1
$comPort = "COM5"
class SerialCommunicator
hidden [int] $WaitTimeForResponse=1 # Wait Time for Response in Seconds
hidden [int] $ComPortBaudRate=9600;
hidden [System.IO.Ports.Parity] $ComPortParity = [System.IO.Ports.Parity]::None;
hidden [int] $ComPortDataBits=8;
hidden [int] $ComPortStopBits=1;
daBONDi / CleanUpDockerImagesExample.ps1
Created Apr 27, 2018
Cleanup Docker Images Powershell
View CleanUpDockerImagesExample.ps1
# Epic Akward Powershell Cleanup for Docker images
# Get Docker Images with <None> in Line and return the a List of Image Ids
docker images --no-trunc | ?{ $_ -match "<none>" } | % { ($_ -split '\s+|\t+')[2]} | %{ ($_ -split ':')[1]}
# Do the Same with Cleanup
docker rmi $(docker images --no-trunc | ?{ $_ -match "<none>" } | % { ($_ -split '\s+|\t+')[2]} | %{ ($_ -split ':')[1]})
daBONDi / Get-NetAdapterDriverVersion.ps1
Created Feb 1, 2018
Get Network Adapter Driver Version
View Get-NetAdapterDriverVersion.ps1
function Get-NetAdapterDriver(){
$NetworkAdapters = Get-WmiObject -Query "Select * from Win32_NetworkAdapter" -ComputerName $Computer
$Drivers = Get-WmiObject -Query "Select * from Win32_PnPSignedDriver where DeviceClass = 'net'" -ComputerName $Computer
$output = New-Object System.Collections.ArrayList
foreach($NetworkAdapter in $NetworkAdapters)
foreach($Driver in $Drivers){
if($Driver.FriendlyName -eq $NetworkAdapter.Name)
daBONDi / ftg-capture.ps1
Last active Jan 25, 2018
Fortigate Powershell Package Capture Script with Conversion
View ftg-capture.ps1
$putty_executable = "C:\Program Files (x86)\PuTTY\putty.exe"
# Download From:
$fgt2eth_executable = "c:\tools\fgt2eth.exe"
$CaptureFilter="host and not host"
$FortigateHost = ""
daBONDi / ansible-win-meltdown-spectre.yml
Last active Jan 16, 2018
Ansible Runbook to manage Windows Server Systems for Meltdown/Spectre
View ansible-win-meltdown-spectre.yml
# Install an Check result of Security Cheks
- name: "Check security posture agains CVE 2017-573,5715,5754"
hosts: windows
gather_facts: true
restart_allowed: false
enable_meltdown: true
enable_spectre: false
View win_ps_ensure
check_command: Test-Path C:\Windows
check_value: true
set_command: New-Item -Type Directory C:\Windows
daBONDi /
Created Mar 14, 2017
Install Ansible and tools from Devel
#!/usr/bin/env bash
# TODO: Rewrite that as Ansible Playbook maybe for vagrant:ansible_local
# Installing Basic Utilitys
sudo apt-get install nano dnsutils
# Installing git
sudo apt-get install git -y
You can’t perform that action at this time.