title | author | date | source | notoc |
---|---|---|---|---|
LDAP Search Filter Cheatsheet |
Jon LaBelle |
January 4, 2021 |
true |
View matrix.yml
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
jobs: | |
example_matrix: | |
strategy: | |
matrix: | |
version: [18] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.version }} |
View replace-img-url.sh
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
#!/bin/bash | |
input="/tmp/realImages.txt" | |
while IFS= read -r line | |
do | |
bob=$(basename $line) | |
find . -type f -exec sed -i '' -e "s,$line,/images/old/$bob,g" {} \; | |
done < "$input" | |
#while read line | |
#find . -type f -exec sed -e "s/$line/2010/g" {} \;;done < /tmp/realImages.txt |
View get-k8s-vars-urls.sh
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
#should get all uri's (including url's) for things like s3, postgres, ftp, etc. | |
kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{.spec.containers[*].env[*].value}{"\n"}{end}' |grep -io "[[:alnum:]]*://[^ ]*" |sort |uniq |
View get-ms-graph-groups.sh
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
https://graph.microsoft.com/v1.0/groups?$search="displayName:YourMom"&$select=id,displayName | |
#need to add a request header ConsistencyLevel:eventual |
View Dockerfile
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
#See https://gist.github.com/bfrancom/6ebebbf899912cd3c76c7f2978be0961 for deploying this docker container on ECS Fargate | |
FROM openjdk:8-jdk-slim as builder | |
#WORKDIR build | |
EXPOSE 8080 | |
RUN mkdir target | |
ARG JAR_FILE=./target/*.jar | |
COPY ${JAR_FILE} target/app.jar | |
#You probably don't want to do this in production, and should tune memory, gc, etc. | |
ENTRYPOINT ["java","-jar","/target/app.jar"] |
View build-jar-deploy-ecs-fargate.yml
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
#See https://gist.github.com/bfrancom/d2ca0f7c767092a924c99545298b557d for Dockerfile used | |
#Author: Ben Francom | |
name: Build | |
#on: workflow_dispatch | |
on: | |
push: | |
branches: | |
- "main" |
View ldap_search_filter_cheatsheet.md
View get-direct-reports.sh
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
#Get users under a manager using MS graph query. Uses select filter for displayName and email address | |
#Use this query in https://developer.microsoft.com/en-us/graph/graph-explorer | |
https://graph.microsoft.com/v1.0/me/directReports?$select=displayName,mail |
View get-aws-iam-users.sh
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
aws iam list-users --query 'Users[*].UserName' |
View pipelinestack.ts
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 * as cdk from 'aws-cdk-lib'; | |
//import * as codecommit from 'aws-cdk-lib/aws-codecommit'; | |
import { Construct } from 'constructs'; | |
import { BenzPipelineStage } from './pipeline-stage'; | |
import { CodeBuildStep, CodePipeline, CodePipelineSource } from 'aws-cdk-lib/pipelines'; | |
import { aws_codebuild as codebuild } from 'aws-cdk-lib'; | |
export class BenzPipelineStack extends cdk.Stack { | |
constructor(scope: Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); |
NewerOlder