Skip to content

Instantly share code, notes, and snippets.

@boostrack
boostrack / convert.groovy
Created February 18, 2023 21:42 — forked from melix/convert.groovy
Convert Confluence HTML export into asciidoc
@Grab('net.sourceforge.htmlcleaner:htmlcleaner:2.4')
import org.htmlcleaner.*
def src = new File('html').toPath()
def dst = new File('asciidoc').toPath()
def cleaner = new HtmlCleaner()
def props = cleaner.properties
props.translateSpecialEntities = false
def serializer = new SimpleHtmlSerializer(props)
@boostrack
boostrack / 00_README.md
Created February 11, 2021 19:52 — forked from alanivey/00_README.md
CentOS 8 AMIs for ARM64 and x86_64
@boostrack
boostrack / CloudWatchAgentConfig.json
Created February 4, 2021 15:47 — forked from csereno/CloudWatchAgentConfig.json
AWS CloudWatch Agent configuration file example for Linux with standard /var/log/messages, secure, and yum logs
{
"agent": {
"metrics_collection_interval": 10,
"logfile": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log"
},
"metrics": {
"metrics_collected": {
"cpu": {
"resources": [
"*"
@boostrack
boostrack / xfs-on-hetzner.yml
Created February 1, 2021 23:37 — forked from exocode/xfs-on-hetzner.yml
Create xfs partitions on Hetzner via cloud-init. It keeps root disk available again after rebooting. Simply change your desired sizes and filesystem to use it for your needs.
#cloud-config
resize_rootfs: false
disk_setup:
/dev/sda:
table_type: 'mbr'
layout:
- 25
- 75
overwrite: true
@boostrack
boostrack / xfs-on-hetzner.yml
Created February 1, 2021 23:37 — forked from exocode/xfs-on-hetzner.yml
Create xfs partitions on Hetzner via cloud-init. It keeps root disk available again after rebooting. Simply change your desired sizes and filesystem to use it for your needs.
#cloud-config
resize_rootfs: false
disk_setup:
/dev/sda:
table_type: 'mbr'
layout:
- 25
- 75
overwrite: true
@boostrack
boostrack / IAM_Role.json
Created February 1, 2021 23:35 — forked from daviddyball/IAM_Role.json
EC2 Metadata Script to Load a bootstrap script from S3 based on EC2 Tag Definitions
{
"Statement": [
{
"Sid": "EC2DescribeInstances",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeTags"
],
"Resource": [
@boostrack
boostrack / raid_ephemeral.sh
Created January 27, 2021 20:51 — forked from joemiller/raid_ephemeral.sh
detect all ephemeral disks on EC2 then stripe together in a raid-0 vol mounted at /mnt
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"
@boostrack
boostrack / 70-ec2-nvme-devices.rules
Created January 27, 2021 20:21 — forked from jalaziz/70-ec2-nvme-devices.rules
AWS EBS NVMe udev rules
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@boostrack
boostrack / README.md
Created January 27, 2021 15:07 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@boostrack
boostrack / Dockerfile
Created January 14, 2021 22:33 — forked from ipmb/Dockerfile
amazon-ssm-agent Dockerfile
FROM golang:1.12-alpine as builder
ARG VERSION=2.3.930.0
RUN set -ex && apk add --no-cache make git gcc libc-dev curl bash && \
curl -sLO https://github.com/aws/amazon-ssm-agent/archive/${VERSION}.tar.gz && \
mkdir -p /go/src/github.com && \
tar xzf ${VERSION}.tar.gz && \
mv amazon-ssm-agent-${VERSION} /go/src/github.com/amazon-ssm-agent && \
cd /go/src/github.com/amazon-ssm-agent && \
echo ${VERSION} > VERSION && \
gofmt -w agent && make checkstyle || ./Tools/bin/goimports -w agent && \