Skip to content

Instantly share code, notes, and snippets.

View corbtastik's full-sized avatar
😀

corbs corbtastik

😀
  • Red Hat - Application Architect
  • Texas
View GitHub Profile
import org.apache.commons.lang3.RandomStringUtils;
import java.util.Calendar;
import java.util.Date;
import java.util.Random;
public final class Randomness {
private static final Random random = new Random(System.currentTimeMillis());
# Ignore docs files
_gh_pages
_site
.ruby-version
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
@corbtastik
corbtastik / yes-no.sh
Last active January 23, 2022 20:55
Bash yes no choice snippet
#!/bin/bash
while true; do
read -p "Do you wish to continue (yes or no)? " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
@corbtastik
corbtastik / BIND.md
Last active February 21, 2021 16:18
RETROMAC_DNS

BIND config for retomac homelab (MacPro 5,1 with vmware)

Provision ubuntu 18.04 VM

  • Manually configure static interface
  • Install Bind DNS - sudo apt-get install bind9 bind9utils bind9-doc

named.conf.options

Configure BIND server options

@corbtastik
corbtastik / VMWARE_FUSION.md
Last active April 8, 2022 15:46
VMWare Fusion Headless VM execution on OSX

Symlink VMs Folder

Create symlink to where VMware Fusion stores VM images, use this symbolic path instead default spacey path. On my OSX dev machine that folder is $HOME/Virtual\ Machines.localized.

# symlink path $HOME/vms
ln -s Virtual\ Machines.localized vms

Create a folder for VMware Fusion stuff

@corbtastik
corbtastik / diskyo.sh
Created April 6, 2021 19:44
cheap disk write test
#!/bin/bash
writeYo() {
X_00=`stat -tc %s .`
dd if=/dev/zero of=/tmp/diskyo-${X_00} bs=${X_00} count=100k conv=fdatasync,notrunc status=progress
X_02=$(( 2*$X_00 ))
dd if=/dev/zero of=/tmp/diskyo-${X_02} bs=${X_02} count=100k conv=fdatasync,notrunc status=progress
X_04=$(( 4*$X_00 ))
dd if=/dev/zero of=/tmp/diskyo-${X_04} bs=${X_04} count=100k conv=fdatasync,notrunc status=progress
X_06=$(( 6*$X_00 ))
dd if=/dev/zero of=/tmp/diskyo-${X_06} bs=${X_06} count=100k conv=fdatasync,notrunc status=progress
@corbtastik
corbtastik / minio.sh
Last active July 6, 2022 07:21
Bash script to configure, start and stop single node MinIO container instance on Docker
#!/bin/bash
# --------------------------------------------------------------------
# [init] Create run dir, env file if they don't exist, then source env
# --------------------------------------------------------------------
init() {
MINIO_CONTAINER_NAME=$1
MINIO_RUN_DIR=/data1/run/${MINIO_CONTAINER_NAME}
MINIO_DATA=${MINIO_RUN_DIR}/data
MINIO_CERTS=${MINIO_RUN_DIR}/certs
# create run dir for container instance
@corbtastik
corbtastik / todos-multi-container.md
Last active May 11, 2022 19:11
A multi-container experiment with podman

Todo(s) Multi Container with Podman

An experiment running multiple Rootless containers in podman.

4 container application

Source Code

@corbtastik
corbtastik / .bashrc
Created January 3, 2023 00:27
Corb's bashrc file
# -----------------------------------------------------------------------------
# corbs-bashrc:v1
# -----------------------------------------------------------------------------
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment