# Add alias to user profile
RUN echo "alias ll='ls -la'" >> /root/.bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Hello World</title> | |
<style> | |
/* Reset some default browser styles */ | |
body, h1, p { | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script installs Docker Community Edition on RHEL 9 and performs necessary post-installation steps. | |
# Based on the instructions at https://docs.docker.com/engine/install/rhel/ | |
# | |
# License: ATTRIBUTION-SHAREALIKE 4.0 INTERNATIONAL (https://creativecommons.org/licenses/by-sa/4.0/) | |
# By: Eric A. Soto, [email protected] | |
# Exit immediately if a command exits with a non-zero status | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script performs OCR on a PDF file using OCRmyPDF, | |
# optimizes images and document layout. | |
# | |
# Uses OCRmyPDF - https://github.com/ocrmypdf/OCRmyPDF | |
# | |
# Dependencies: | |
# - `brew install tesseract-lang`` # Option 2: for all | |
# language packs (to support spanish and others) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Edit these two variables to control the cert minting process | |
CERT_DIR=/path/to/dir/where/you/want/the/certs | |
HOSTNAME="enter-your-fully-qualified-hostname-here" | |
# Check for dependencies | |
if ! command -v openssl &> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################################################### | |
# 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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################## | |
# 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 [email protected] | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/" |
NewerOlder