Skip to content

Instantly share code, notes, and snippets.

View burck1's full-sized avatar

Alex Burck burck1

View GitHub Profile
@burck1
burck1 / route53_ddns.py
Created September 28, 2021 01:15
Poor Man's Route53 DDNS
'''
Run this script periodically to automagically update
a domain name with your current public IP. Schedule
this to run periodically on a Raspberry Pi for a
poor man's Dynamic DNS (DDNS).
Run "python route53_ddns.py --help" for more info.
'''
import boto3
import requests
@burck1
burck1 / choco-output.txt
Created April 23, 2021 19:45
choco install vcredist2010 -debug -verbose
Chocolatey v0.10.15
Chocolatey is running on Windows v 10.0.19042.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" install vcredist2010 -debug -verbose
Received arguments: install vcredist2010 -debug -verbose
RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
Sending message 'PreRunMessage' out if there are subscribers...
[Pending] Removing all pending packages that should not be considered installed...
Performing validation checks.
@burck1
burck1 / lambda_handler.py
Created March 12, 2020 22:44
AWS Lambda Secure Configuration
import os
import boto3
import json
CONFIG_PREFIX = os.getenv('CONFIG_PREFIX')
if not CONFIG_PREFIX:
raise Exception('The CONFIG_PREFIX environment variable is not set. Set this value to continue.')
ssm = boto3.client('ssm')
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::999999999999:role/octopus-deploy-server"
},
"Action": "sts:AssumeRole"
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"kms:Decrypt"
],
"Resource": "arn:aws:kms:us-east-1:xxxxxxxxxxx:alias/aws/ssm"
},
@burck1
burck1 / Update-AUPackages.md
Last active January 3, 2022 16:00
Update-AUPackages Report #powershell #chocolatey
@burck1
burck1 / OpenamRESTapi
Last active November 20, 2022 12:24
OpenAM REST api summary
Ref: http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#chap-rest
Authentication - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-auth-json
Token Validation - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-token-validation
User Self Registration - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-self-registration
Reseting Forgotten Passwords - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-password-reset
Identity Management - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-crud-identity
Login v1:
using Microsoft.AspNet.Identity;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Microsoft.Owin.Security.Google;
using Microsoft.Owin.Security.Facebook;
using Owin;
namespace ContactManager
{
public partial class Startup