Skip to content

Instantly share code, notes, and snippets.

View hvindin's full-sized avatar

Henry Vindin hvindin

  • Sydney, Australia
View GitHub Profile
@hvindin
hvindin / upgrade-to-rhel8
Last active March 14, 2023 16:59
leapp rhel 7 to rhel 8
#!/bin/bash
if ! command -v subscription-manager > /dev/null; then echo "Cannot find subscription-manager"; exit 1; fi
if ! sudo subscription-manager status | grep -q 'Current'; then echo "Current subscription is not current!"; exit 1; fi
if grep -qvF 7.6 <(paste -s </etc/os-release); then if sudo subscription-manager release | grep -Eqv 'Release: 7(\.6|Server)'; then echo "Subscription is not to 7.6 or 7Server. Updating."; sudo subscription-manager release --set=7Server; fi; fi
sudo subscription-manager repos --disable="*" --enable=rhel-7-server-rpms --enable=rhel-7-server-supplementary-rpms --enable=rhel-7-server-extras-rpms
for repo in $(sudo repoquery --all --qf "%-20{ui_from_repo}" | sed -e 's#^@##g' | sort -u); do
if grep -Fqv "${repo}" <(paste -s </etc/yum.repos.d/redhat.repo); then
nonrhelrepos+=("${repo}")
fi
done
@hvindin
hvindin / Jfrog-CLA-signed-page.pdf
Last active April 25, 2018 11:11
signed CLA confirmation page
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hvindin
hvindin / Alternatively-pihole-FTL.service
Last active April 22, 2018 13:49
pihole-FTL.service systemd
[Unit]
Description=Pi-hole FTLDNS
After=network.target
Wants=lighttpd.service
[Service]
Type=forking
User=pihole
Group=pihole
PIDFile=/run/pihole-FTL.pid
@hvindin
hvindin / ngx_http_subs_filter_module.so
Created January 5, 2018 08:48
ngx_http_subs_filter_module.so for nginx 1.13.8

Keybase proof

I hereby claim:

  • I am hvindin on github.
  • I am hvindin (https://keybase.io/hvindin) on keybase.
  • I have a public key ASBJA-xAl60HW4q2DFxddORP8C9E6NFadmyG_5DtPQkWSAo

To claim this, I am signing this object:

@hvindin
hvindin / wrong.repo.png
Last active October 11, 2016 23:02
Wrong repo
wrong.repo.png
#!/bin/sh
showHelp() {
cat <<EOF
This script requires 2 or 3 arguments exactly.
"${0}" <redhat username> <redhat password> [<redhat release>]
examples:
"${0}" user1 passw0rd! 7Server
"${0}" user2 pAssw@rd
By default the omission of the release version will default to 7Server being set.
2016/09/01 00:04:15 [INFO] Packer version: 0.10.1
2016/09/01 00:04:15 Packer Target OS/Arch: linux amd64
2016/09/01 00:04:15 Built with Go Version: go1.6.2
2016/09/01 00:04:15 Detected home directory from env var: /home/hvindin
2016/09/01 00:04:15 Using internal plugin for docker
2016/09/01 00:04:15 Using internal plugin for vmware-vmx
2016/09/01 00:04:15 Using internal plugin for azure-arm
2016/09/01 00:04:15 Using internal plugin for null
2016/09/01 00:04:15 Using internal plugin for amazon-instance
2016/09/01 00:04:15 Using internal plugin for file
SyslogFacility AUTHPRIV
PermitRootLogin yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PermitEmptyPasswords yes
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no