Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
codz

Sam Mingo slmingol

:octocat:
codz
View GitHub Profile
@slmingol
slmingol / github-actions-notes.md
Created Jun 4, 2021 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
View github-actions-notes.md
@slmingol
slmingol / TrueColour.md
Created May 30, 2021 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@slmingol
slmingol / version-up.sh
Created May 8, 2021 — forked from OleksandrKucherenko/version-up.sh
Calculate Next Suitable Version Tag for Your Git based project
View version-up.sh
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2017-09-29
# For help:
# ./versionip.sh --help
# For developer / references:
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php
# http://tldp.org/LDP/abs/html/comparison-ops.html
@slmingol
slmingol / ansible.cfg
Created Mar 18, 2021 — forked from krigar/ansible.cfg
Bastion Playbook
View ansible.cfg
[ssh_connection]
ssh_args = -F ssh.cfg
control_path = ~/.ssh/mux-%r@%h:%p
@slmingol
slmingol / SSHrsync.sh
Last active Oct 10, 2020 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
View SSHrsync.sh
rsync -aHAXxv --numeric-ids --delete --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir>
@slmingol
slmingol / build_arm64_rpi_userland.sh
Last active Sep 16, 2020 — forked from satmandu/build_arm64_rpi_userland.sh
Generate an arm64 rpi userland for use on ubuntu/arm64.
View build_arm64_rpi_userland.sh
#!/bin/bash -x
workdir="${HOME}/workdir"
[[ ! -d "$workdir" ]] && ( mkdir -p "$workdir" || exit 1)
[[ ! -d "$workdir"/tmp ]] && ( mkdir -p "$workdir"/tmp || exit 1)
[[ ! -d "$workdir"/output ]] && ( mkdir -p "$workdir"/output || exit 1)
echo "workdir is ${workdir}"
tmpdir=$(mktemp -d deb_XXXX -p "$workdir"/tmp)
deb_temp=${tmpdir}/deb
extract_tmp=${tmpdir}/extract
@slmingol
slmingol / cool.sh
Created Jul 7, 2020 — forked from orhun/cool.sh
Random MOD player
View cool.sh
#!/bin/bash
# Plays a random MOD file from https://modarchive.org
# Depends on XMP (http://xmp.sourceforge.net/)
rand=$(shuf -i 1-189573 -n 1)
tmp=$(mktemp /tmp/${rand}.XXXXXXXX.mod)
curl https://modarchive.org/jsplayer.php?moduleid=${rand} > ${tmp}
xmp ${tmp}
rm ${tmp}
@slmingol
slmingol / remote_crc.md
Created Jun 16, 2020 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server
View remote_crc.md

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F

View Byte Formatting for Google Sheets.md