Skip to content

Instantly share code, notes, and snippets.

@craig-m-unsw
craig-m-unsw / 1-orgs-archetype.md
Created December 7, 2023 05:03 — forked from whatupfoo/1-orgs-archetype.md
Orgs and Teams Best Practices

Organization archetypes

The intention of this document is to provide some guidance and suggestions to customers who are wondering how they should structure organizations and teams in their GitHub Enterprise environment. The idea isn't to give hard and fast rules on which approach is better than the other, but to give examples of when one approach might be preferable to another depending on the use case.

1. A single organization with direct organization membership for repository access (not teams)

          ________________
          |     Org      |
          |    ______    |
          |   |      |\  |

| | Repo | \ |

@craig-m-unsw
craig-m-unsw / content.md
Created December 7, 2023 04:21 — forked from heridev/content.md
Third party SAML Single Sign On (SSO) integration/implementation - Tech spec

Third party SAML Single Sign On (SSO) integration/implementation - Tech spec

  • Author: Heriberto Perez

Background

The implementation of SSO in order to connect with other services/providers/sites is a common requirement these days

For those cases when you have the need to integrate a third party service and embed some widgets in your site, and in order to make it in a secure way and based on dynamic data for the current authenticated, that is when the SSO integration comes handy for you.

Goals

This Tech spec will serve as a reference a SAML Single Sign On (SSO) integration.

@craig-m-unsw
craig-m-unsw / pe-git-sshd.py
Last active December 11, 2023 02:49
pe-git-sshd.py - get sshd fingerprints of git server for PE config.
#!/usr/bin/env python3
'''
set sshd fingerprints of git server for PE config.
https://www.puppet.com/docs/pe/2023.5/code_mgr_config
'''
import subprocess
import argparse
import re
@craig-m-unsw
craig-m-unsw / README.md
Created November 17, 2023 05:43 — forked from RichardBronosky/README.md
Using cloud-init for cloudless provisioning of Raspberry Pi

Installing cloud-init on a fresh Raspbian Lite image

This is a work in Progress!

Purpose

This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.

I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash so everything I do, you could also do at the command line. (Even the for loop.)

@craig-m-unsw
craig-m-unsw / Exploitation.md
Created November 16, 2023 05:24 — forked from yezz123/Exploitation.md
Pentesting-Exploitation
@craig-m-unsw
craig-m-unsw / r10k-4.0.md
Created November 14, 2023 00:18 — forked from justinstoller/r10k-4.0.md
support discussion

7 Things to know about r10k 4 in PE 2023.4

(From the PE documentation at: https://www.puppet.com/docs/pe/2023.4/upgrading_pe#upgrade_cautions-r10k-4-upgrade)

  1. Starting in PE 2023.4, if you use Code Manager or r10k, with SSH protocol for remote Git repository access, you must set up SSH host key verification.

To manage the known_hosts file and enable host key verification for Code Manager or r10k, you must define the puppet_enterprise::profile::master::r10k_known_hosts paramet er with an array of hashes specifying "name", "type", and "key" with your hostname, key type, and public key, respectively.

This is the error message you will see if running code deploy:

@craig-m-unsw
craig-m-unsw / security-bruteforce-report.md
Created November 8, 2023 10:12 — forked from GabMus/security-bruteforce-report.md
Bruteforcing the 3 main security levels of a computer
@craig-m-unsw
craig-m-unsw / dbus-daemon.c
Created November 6, 2023 12:41 — forked from dradtke/dbus-daemon.c
An example Linux daemon using DBus.
/*
* This is an example Linux daemon that communicates via dbus.
* When run, it will daemonize and print to standard output two lines:
*
* 1. The PID of the daemon process, which can be used to kill it later with `kill -s SIGINT <pid>'
* 2. The unique D-Bus address it will be listening to
*/
#include <signal.h>
#include <stdio.h>
@craig-m-unsw
craig-m-unsw / Dockerfile
Last active November 10, 2023 05:29
ms_repo_ubuntu.py - script to install MS apt repo with debsig on Ubuntu 20.04 and 22.04
# Ubuntu Dockerfile for testing
ARG ubuntu_version
FROM ubuntu:${ubuntu_version}
ENV DEBIAN_FRONTEND noninteractive
ENV debug_repo_script True
RUN sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
apt-get update && \