# Add alias to user profile
RUN echo "alias ll='ls -la'" >> /root/.bashrc
<# | |
.SYNOPSIS | |
Checks if a specified port on a given hostname is open or closed, with a simplified output. | |
.DESCRIPTION | |
This script uses the Test-NetConnection cmdlet to attempt a TCP connection to a specified hostname and port. | |
It then checks the result of this attempt to determine if the port is open (indicating the host is listening on that port) | |
or if the port is closed/not reachable. The result is printed to the console with a color-coded message. | |
.PARAMETER hostname |
###################################################################### | |
# Runs another powershell script at a given interval. | |
# Syntax: | |
# .\run-script-at-interval.ps1 [script path] [interval in seconds] | |
# Example: | |
# .\run-script-at-interval.ps1 .\script-to-run.ps1 60 | |
###################################################################### | |
param ( | |
[string]$ScriptPath, |
########################################################## | |
# ps-post-benchmark.ps1 | |
# | |
# A powershell script to make a POST to a remote URI | |
# and measure the response time. | |
# | |
# Useful when a client only has Powershell. | |
# | |
# Copyright 2023 eric@issfl.com | |
# |
# Pass headers into Elasticsearch: | |
# - Authorization can be used to pass BASIC AUTH with a TOKEN. Use | |
# a tool of your choice to convert your username/password into | |
# the proper token for basic auth. | |
ED_HEADERS='{"Authorization": "Basic YOUR-BASIC-AUTH-TOKEN-HERE"}' | |
# Host must end in "/" | |
# Include ":port-number" if necessary (otherwise, 443 is inferred by https) | |
ED_HOST="https://your-host.com:port-number/" |
#!/bin/bash | |
############################################################################ | |
# This script iterates over each child directory from where it runs | |
# and deletes ALL contents of those child directories, while leaving | |
# the directory itself intact. | |
# | |
# Copyright 2020 Eric A. Soto, eric@issfl.com | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a |
Ansible is very helpful for automated deployments. However, it can also be used for server admin tasks against many servers by using both the Command, Shell and Script Modules.
Note: Although the process described here works with hosts that you can access via password or SSH keys, it is more convenient when working with hosts that you have SSH keys for (you don't have to enter passwords!)
This post explains how to create an AWS S3 Bucket and an IAM User with programmatic access to the bucket.
You will need access to the AWS S3 console for your account and have permissions to create new buckets and create new IAM users.
This is based on:
This post explains how to manually create a Snapshot of an Elastic Cloud instance to an AWS S3 Bucket using what Elasticsearch calls a custom repository.
This is based on the following: