Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan djjudas21

View GitHub Profile
@djjudas21
djjudas21 / README.md
Created Dec 30, 2020
MicroK8s, Ingress and MetalLB
View README.md

Ingress MetalLB

Out of the box, the MicroK8s distribution of ingress-nginx installed as the MicroK8s addon ingress binds to ports 80+443 on the node's IP address using a hostPort, as we can see here:

microk8s kubectl -n ingress describe daemonset.apps/nginx-ingress-microk8s-controller
Name:           nginx-ingress-microk8s-controller
Selector:       name=nginx-ingress-microk8s
@djjudas21
djjudas21 / README.md
Created Jun 23, 2021
Basic example of a minimal ssh bastion deployment
View README.md

ssh

Simple ssh server deployment with persistent root user home directory and persistent ssh host keys

Currently no password auth

kubectl apply -f config.yaml -f deployment.yaml -f pvc.yaml -f service.yaml
View pyproject.toml
[tool.poetry]
name = "camerahub"
version = "0.0.0"
description = "App for cataloguing vintage cameras, lenses, films, negatives & prints"
authors = ["Jonathan Gazeley <camerahub@jonathangazeley.com>"]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://camerahub.info/"
repository = "https://github.com/djjudas21/camerahub"
packages = [
@djjudas21
djjudas21 / requirements.txt
Created Feb 27, 2020
django-data-wizard troubleshooting
View requirements.txt
Django>=2.1.0,<3.0.0
pytz>=2019.0,<2020.0
sqlparse>=0.3.0,<1.0.0
django-money>=0.15,<1.0
django-choices>=1.7.0,<2.0.0
django-favicon>=0.1.3,<1.0.0
psycopg2-binary>=2.8.0,<3.0.0
PyMySQL>=0.9.0,<1.0.0
django-currentuser>=0.4.0,<0.5.0
uWSGI>=2.0.0,<3.0.0
View config_report_20200203.json
{
"basic": {
"license key": "***REMOVED SENSITIVE VALUE***",
"date": "Mon, 03 Feb 2020 12:15:44 +0000",
"ownCloud version": "10.3.2.2",
"ownCloud version string": "10.3.2",
"ownCloud edition": "Community",
"server OS": "Linux",
"server OS version": "Linux owncloud-68c4cbb6b6-b9484 5.4.13-201.fc31.x86_64 #1 SMP Tue Jan 21 17:21:47 UTC 2020 x86_64",
"server SAPI": "apache2handler",
@djjudas21
djjudas21 / crash.log
Created Feb 18, 2019
Crash when importing Google compute instance group manager
View crash.log
2019/02/18 14:20:07 [INFO] Terraform version: 0.11.11
2019/02/18 14:20:07 [INFO] Go runtime version: go1.11.4
2019/02/18 14:20:07 [INFO] CLI args: []string{"/home/linuxbrew/.linuxbrew/Cellar/terraform/0.11.11/bin/terraform", "import", "google_compute_instance_group_manager.jenkins-nodes-terraform-2", "jenkins-nodes-terraform-2"}
2019/02/18 14:20:07 [DEBUG] Attempting to open CLI config file: /home/jonathan/.terraformrc
2019/02/18 14:20:07 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/02/18 14:20:07 [INFO] CLI command args: []string{"import", "google_compute_instance_group_manager.jenkins-nodes-terraform-2", "jenkins-nodes-terraform-2"}
2019/02/18 14:20:07 [INFO] command: empty terraform config, returning nil
2019/02/18 14:20:07 [DEBUG] command: no data state file found for backend config
2019/02/18 14:20:07 [DEBUG] New state was assigned lineage "36a3fa3b-d832-20c7-bd91-eb748273df8b"
2019/02/18 14:20:07 [INFO] command: backend initialized: <nil>
View keybase.md

Keybase proof

I hereby claim:

  • I am djjudas21 on github.
  • I am jgazeley (https://keybase.io/jgazeley) on keybase.
  • I have a public key ASC252FXOtAmdxl5qjdpn6nJILhT5p4HItXhIOBAgl863wo

To claim this, I am signing this object:

@djjudas21
djjudas21 / check_radius_status.pl
Last active Mar 22, 2018
Nagios plugin to check RADIUS status
View check_radius_status.pl
#!/usr/bin/perl -w
use strict;
use Config::Tiny;
# Sample command
# echo "Message-Authenticator = 0x00, FreeRADIUS-Statistics-Type = 7" | radclient HOSTNAME:PORT status SECRET
# Sample response
# Received response ID 183, code 2, length = 344
View build.log
[jonathan@poseidon SPECS]$ rpmbuild -ba dupeguru.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.XBntwT
+ umask 022
+ cd /home/jonathan/rpmbuild/BUILD
+ cd /home/jonathan/rpmbuild/BUILD
+ rm -rf dupeguru-4.0.3
+ /usr/bin/mkdir -p dupeguru-4.0.3
+ cd dupeguru-4.0.3
+ /usr/bin/gzip -dc /home/jonathan/rpmbuild/SOURCES/dupeguru-src-4.0.3.tar.gz
+ /usr/bin/tar -xof -
View update-puppet-modules.pl
#!/usr/bin/perl -w
use Switch;
# check we are root first
if ( $< != 0 ) {
print "This script must be run as root\n";
exit (0);
}