Skip to content

Instantly share code, notes, and snippets.

@hbombonato
hbombonato / create-docker-tls.sh
Created May 25, 2018 13:32 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
@hbombonato
hbombonato / HostedServices.tf
Created May 11, 2018 13:01 — forked from proffalken/HostedServices.tf
Terraforming with Azure
resource "azure_hosted_service" "azure_test_nat" {
name = "azure_test_nat"
location = "North Europe"
ephemeral_contents = false
description = "Nat Gateway Hosted service created by Terraform."
label = "azure_test_nat"
}
# (On Mac OSX) Start recording with your login shell. 
# This ensures any aliases you've setup in .bash_profile are still available
cd ~/PhpStormProjects/asciinema/
python3 -m asciinema rec terminal.log -c "/bin/bash -l" -w5
@hbombonato
hbombonato / gist:e1f350bdd7769dc4947241a35d341594
Created May 24, 2017 01:40
Filebucket rollback with Puppet
#!/bin/bash
repofilebucket="$1"
file=$2
echo "Filebucket repo: $1";
echo "File to restore: $2";
files=$(find $repofilebucket -iname "paths" | xargs -i ls {})
for i in $files
@hbombonato
hbombonato / gist:785624331d8cbc0072691e68b88fa028
Created May 24, 2017 01:40
Filebucket rollback with Puppet
#!/bin/bash
repofilebucket="$1"
file=$2
echo "Filebucket repo: $1";
echo "File to restore: $2";
files=$(find $repofilebucket -iname "paths" | xargs -i ls {})
for i in $files
@hbombonato
hbombonato / ssh.md
Created May 13, 2017 00:24 — 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"
  }
}
@hbombonato
hbombonato / extractor.json
Created May 13, 2017 00:13 — forked from kangguru/extractor.json
graylog2 extractors
{
"extractors": [
{
"condition_type": "string",
"condition_value": "sudo:",
"converters": [],
"cursor_strategy": "copy",
"extractor_config": {
"regex_value": "sudo:\\s+(\\S+)\\s+:"
},
@hbombonato
hbombonato / post.py
Created May 4, 2016 03:43 — forked from hoest/post.py
Simple Python script to post a XML file to an web-interface
import httplib
import xml.dom.minidom
HOST = "www.domain.nl"
API_URL = "/api/url"
def do_request(xml_location):
"""HTTP XML Post request"""
request = open(xml_location, "r").read()
@hbombonato
hbombonato / ubuntu11.10-gems.erb
Created January 5, 2016 15:25 — forked from stormsilver/ubuntu11.10-gems.erb
ubuntu11.10-gems.erb template
bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
if [ ! -f /usr/bin/chef-client ]; then
apt-get update
apt-get install -y ruby1.9.1 ruby1.9.1-dev build-essential wget
cd /tmp
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.8.15.tgz
tar zxf rubygems-1.8.15.tgz
cd rubygems-1.8.15
{
"title": "VMware",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,