Skip to content

pmcdowell-okta/my-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Notes

I had a bunch of notes I was keeping in Google Keep, that no one else could see or use, so I decided to put many of them up on GitHub.com so maybe other could find them useful.

starterHTML
When starting with HTML from Scratch, this what what I use, it has a simple style sheet and Jquery ready to run.

Login Widget on JsFiddle
I experiemented with successfully running the Okta Login Widget on JSFiddle, works great ! and perfect for training.

Login Widget with CORS on PHP Server
CORS configuration can be confusing when you first start, this is about as basic of an example as I could create to show how to send a Bearer Token to a Server via CORS.

Javascript Promises
Promises Promises were a bit tricky for me, I used this over and over again until I felt comfortable with it. It also uses the ES5/6 Fat Arrow to abbreviate the functions.

Okta

Custom Login page with SPA
Working with Okta On Pre

Add Key to Okta On Premise Agent/JRE
Working with Okta On Premise Agent, and using HTTP(s), this step is required.

AWS SAM (Server Application Model)

Generate test events from SAM:

sam local generate-event help Lists all options

AWS Sample Templates
Lots of Sample Templates, you'll need them as a reference

Getting going with SAM
Example I used to get me started with AWS SAM

More Simple Examples of using SAM / Cloudformation
SAM takes a while to understand, still learning, refined what I was workign with.

Okta Guest Account SAM / Cloudformation
Creates a Lambda and API Gateway to log a user in as a Guest

AWS ApiGateway, Anything goes Authorizer
A Authorizer for Allowing/Denying Anything, for test

AWS SAM/Cloudformation for Okta Rental Backend
Example of how to use SAM/Cloudformation to deploy API Gateway on Amazon AWS Will Add Authorizer soon

AWS SAM/Cloudformation for Okta Rental Backend w/ Authorizer
Combining the above two examples, API Gateway w/ an Authorizer

AWS LaunchStack and Share!
Now get Fancy create a new [LaunchStack] Button on your code, and share your code

Run Lambda Function in Cloudformation Template
Run a Lambda Function from your SAM Cloudformation Teamplate (Hard to figure out)

Capture output from Custom Resource
Capture the output from a Custom Resource (lambda in this case)

Create Lambda with Role (YAML)
Create an in-line Lambda function, and configure Role

Custom Resource Orchestration
Run Custom Resource, then take output and pass to another Custom Resource

Create S3 Bucket with URL for Okta Org
Create S3 Bucket, make Okta login widget page

node.js

Random Code Snippets
Random Code snippets I use when I forget stuff

How I test my package with Docker
This is how I use Docker to test github releases

Recursively install packages
When I have multiple directories of package (like Lambdas) I use npm-recursive-install

Angular

Angular Notes
Getting started with Angular 5-ish. Notes to get me going

Amazon basics

Switch User Profile AWS CLI: export AWS_PROFILE=user

Amazon Lambda

Testing lambdas locally with lambda-local
How to test your lambda function locally

Amazon Upload Basic Lambda
Upload a basic Lambda Function using AWS CLI.

Amazon Misc Commands
Delete, list, and Mass Delete Lambda Functions

Stock Lambda Function
The Standard Lambda Function in AWS.. Sometimes I need to look it up.

Amazon Cloud Watch

Delete All Cloudwatch Logs
I use this often, even setup an Alias for it in Bash

Amazon Lambda Edge Functions

Set Cookie on Amazon Lambda Edge
Set a Cookie on Lambda Edge.. In this case I was working to exchange a cookie for a JWT.

Lambda Edge Static Web Page
Render a Static Web Page on Lambda Edge (ideally you would use an S3 Bucket, but this will get you started)

Amazon S3

Common S3 Commands you should know
Common Commands you should know. But often forget

Delete all S3 Buckets
Use at your own Risk, but I used this often for testing

Delete Buckets with Versioning
It's a pain deleting buckets with Versioning, this helped me.

PHP

PHP Jwt Decode
Decode JWT in php, this does not include verification code

Docker

Basics

Build Docker Image docker build -t pmcdowell/deletemeanytimne .
Push to DockerHub docker push pmcdowell/deletemeanytimne
Docker Rename docker rename my_container my_new_container
Docker force Delete Image docker rmi a693c8a85fa7 -f
Quick, run a PHP Server docker run -p 8000:80 -it -v "$PWD":/var/www/html php:7.0-apache /bin/bash -c "service apache2 start; bash"

Docker Snapshot
Simple instructions to take a snapshot in Docker

Docker Nginx Hacking Proxy
Simple Reverse Proxy with Nginx using Docker

Okta Agent Dockerfile
This is a Centos Docker Image I used to run Okta LDAP and On-Premise Agent

GIT

Basic .gitignore file
This is the basic file I use for Git to ignore my .idea and other files.

Security Stuff

Generate Self Signed Certificates
Script to make certificates

Bash Shell

Do a infinite For/Loop : `while true ; do echo "do this"; done

Make symbolic Link : ln -s /Users/mickeymouse/Box\ Sync/c-\=Code\=-/
Reverse looking previous coommands: [CTRL-r] MacOS (Thanks Joël for this trick)
Goto Beginning of Line: [CTRL-a] MacOS
Goto End of Line: [CTRL-e] MacOS `

Microsoft Remote Desktop

CTRL+ALT+DEL = FM+CTRL+OPTION+delete

Intellij / JetBrains

Increase Selected Text [OPTION] + [UP ARROW]
Surround code With [OPTION] + [COMMAND] + t
Join lines [CTRL] + [SHIFT] +j
Select words w/ keyboard [Shift]+[Option] (left/right) arrow
Vertical Selection CMD.exe style [Option] , drag cursor
Multi Cursor [Option] + [Shift] , Click Away