This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getpass | |
import sys | |
import xml.etree.ElementTree as Et | |
import requests | |
try: | |
NEW_USERNAME = sys.argv[1] | |
except IndexError: | |
print('No username provided!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import os | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.backends import default_backend | |
class AESCipher(object): | |
block_size = algorithms.AES.block_size / 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Parameters: | |
AvailabilityZone1: | |
Type: String | |
Default: a | |
AvailabilityZone2: | |
Type: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automated Unit Tests | |
on: [pull_request] | |
jobs: | |
automated-unit-tests: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
# See https://github.com/aws-actions/configure-aws-credentials#sample-iam-role-cloudformation-template | |
Parameters: | |
GitHubOrg: | |
Type: String | |
RepositoryName: | |
Type: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
# See https://github.com/aws-actions/configure-aws-credentials#sample-iam-role-cloudformation-template | |
Parameters: | |
GitHubOrg: | |
Type: String | |
RepositoryName: | |
Type: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
# This can only be deployed once per account. | |
Resources: | |
GitHubOIDC: | |
Type: AWS::IAM::OIDCProvider | |
Properties: | |
Url: https://token.actions.githubusercontent.com | |
ClientIdList: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Parameters: | |
DomainName: | |
Type: String | |
AllowedPattern: "^[a-z][a-z0-9-]{0,48}[a-z0-9]$" | |
RepositoryName: | |
Type: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import logging | |
import requests | |
import urlparse | |
class JamfUAPIAuthToken(object): | |
def __init__(self, jamf_url, username, password): | |
""" | |
:param jamf_url: Jamf Pro URL | |
:type jamf_url: str |
NewerOlder