https://github.com/okta/okta-spring-boot
Spring Boot Version Compatibility
Okta Spring Boot SDK Versions | Compatible Spring Boot Versions |
---|---|
1.2.x | 2.1.x |
1.4.x | 2.2.x |
1.5.x | 2.4.x |
2.0.x | 2.4.x |
2.1.x | 2.7.x |
https://github.com/okta/okta-spring-boot
Okta Spring Boot SDK Versions | Compatible Spring Boot Versions |
---|---|
1.2.x | 2.1.x |
1.4.x | 2.2.x |
1.5.x | 2.4.x |
2.0.x | 2.4.x |
2.1.x | 2.7.x |
#!/bin/bash
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
echo "hello from $(hostname -f)" > /var/www/html/index.html
#https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/
sudo amazon-linux-extras install epel -y
sudo yum install -y tinyproxy
vim /etc/tinyproxy/tinyproxy.conf
#Allow
Log /tmp
Pid /tmp
AWS Certified Cloud Practitioner Training 2020 - Full Course
https://youtu.be/3hLmDS179YE?t=3266 EC2 create witch IAM role to access SSM
S3 - CloudFront - edge locations
https://youtu.be/3hLmDS179YE?t=6567 AWS Marketplace
AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam!
https://youtu.be/SOTamWNgDKc?t=14799 AWS toolkit for VSCode
https://github.com/Mainak99/AWS-Slides
https://www.youtube.com/watch?v=U3VSJhaC4kc
CheatSheet:
EB https://www.youtube.com/watch?v=RrKRN9zRBWs&t=0s
Cognito https://youtu.be/RrKRN9zRBWs?t=15919
SNS https://youtu.be/RrKRN9zRBWs?t=16378
SQS https://youtu.be/RrKRN9zRBWs?t=17013
https://www.linkedin.com/pulse/sqs-send-receive-delete-messages-nodejs-karandeep-singh-/?trk=articles_directory
var AWS = require('aws-sdk') var sqs = new AWS.SQS(); // For Standard Queue exports.handler = async (event) => { var params = { DelaySeconds: 2, MessageAttributes: { "Author": { DataType: "String", StringValue: "Karandeep Singh" }, }, MessageBody: "TEST of the SQS service.", QueueUrl: "https://sqs.us-east-1.amazonaws.com/570411717331/MyTestQueue" }; let queueRes = await sqs.sendMessage(params).promise(); const response = { statusCode: 200, body: queueRes, }; return response;
Nana: https://www.youtube.com/watch?v=qP8kir2GUgo
https://www.youtube.com/watch?v=PGyhBwLyK2U
(https://www.youtube.com/watch?v=8aV5AxJrHDg&list=PLZMWkkQEwOPmGolqJPsAm_4fcBDDc2to_)
image: amazoncorretto:11-alpine-jdk
variables:git reset filename.txt
UNAME: ${UNAME}
PASSWD: ${PASSWD}
stages: # List of stages for jobs, and their order of execution
- build
- test
- deploy
build-job: # This job runs in the build stage, which runs first.
stage: build
script:
- echo "Compiling the code..."
- java -version
- ./gradlew clean build
- echo $UNAME
- echo ${UNAME}
- echo "Compile complete."
artifacts:
untracked: false
expire_in: 1 days
paths:
# - build
- "build/libs/demo-0.0.1.jar"
unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
script:
- echo "Running unit tests... This will take about 6 seconds."
- sleep 0
- echo "Code coverage is 90%"
- ls build/libs/demo-0.0.1.jar
- ./gradlew test
- echo $PASSWD
.lint-test-job: # This job also runs in the test stage.
stage: test # It can run at the same time as unit-test-job (in parallel).
script:
- echo "Linting code... This will take about 1 seconds."
- sleep 0
- echo "No lint issues found."
deploy-job: # This job runs in the deploy stage.
when: manual
# rules:
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
image:
name: amazon/aws-cli
entrypoint: [""]
environment: production
script:
- echo "Deploying application..."
- echo $CI_COMMIT_MESSAGE > /tmp/CI_COMMIT_MESSAGE
- ls build/libs/demo-0.0.1.jar
- aws --version
- aws s3 cp /tmp/CI_COMMIT_MESSAGE s3://demobucketencaps/CI_COMMIT_MESSAGE
- aws s3 cp build/libs/demo-0.0.1.jar s3://demobucketencaps/demo-0.0.1.jar
- echo "Application successfully deployed."
.gitlab-ci.yml
https://www.youtube.com/watch?v=PGyhBwLyK2U
FROM amazoncorretto:11-alpine-jdk
EXPOSE 8080/tcp
COPY ./build/libs/demo-0.0.1.jar /tmp/
CMD ["java", "-jar", "/tmp/demo-0.0.1.jar"]
map.forEach((k, v) -> System.out.println((k + ":" + v)));
map.entrySet().stream()
.forEach(e -> System.out.println(e.getKey() + ":" + e.getValue()));
ArrayDeque<Integer> q = new ArrayDeque<>();
IntStream.range(0, 5).forEach((i) -> {q.addFirst(i);});
System.out.println(q);
IntStream.range(0, 5).forEach((i) -> {
System.out.printf("%d, ", q.pollFirst());
} );
System.out.println(q);
ArrayDeque<Integer> q = new ArrayDeque<>();
IntStream.range(0, 5).forEach((i) -> { q.addFirst(i); });
System.out.println(q);
//[4, 3, 2, 1, 0]
IntStream.range(0, 5).forEach((i) ->{System.out.printf("%d,",q.pollFirst());});
//4, 3, 2, 1, 0,
System.out.println(q); //[]
//q.clear();
###################################
https://www.programcreek.com/2014/04/check-if-array-contains-a-value-java/
1. Four Different Ways to Check If an Array Contains a Value
1) Using List
:
public static boolean useList(String[] arr, String targetValue) { return Arrays.asList(arr).contains(targetValue); } |
2) Using Set
:
public static boolean useSet(String[] arr, String targetValue) { Set<String> set = new HashSet<String>(Arrays.asList(arr)); return set.contains(targetValue); } |
3) Using a simple loop:
public static boolean useLoop(String[] arr, String targetValue) { for(String s: arr){ if(s.equals(targetValue)) return true; } return false; } |
4) Using Arrays.binarySearch()
:binarySearch()
can ONLY be used on sorted arrays. If the array is sorted, you can use the following code to search the target element:
public static boolean useArraysBinarySearch(String[] arr, String targetValue) { int a = Arrays.binarySearch(arr, targetValue); if(a > 0) return true; else return false; } |
Comparator<Arrow> cmp = Comparator
.comparing(Arrow::getWeight)
.thenComparing(Arrow::getCount, Comparator.reverseOrder())
.thenComparing((a, b) -> Character.compare(a.ch, b.ch));
listChar.sort(cmp);
List<Employee> sortedEmployees = employees.stream()
.sorted(cmp).collect(Collectors.toList());
//////////////////////////////////////////////////////////////////////////////////////////////////////////
Collections.sort(scores, new Comparator<Score>() {
public int compare(Score o1, Score o2) {
return o2.getScores().get(0).compareTo(o1.getScores().get(0));
}
});
Collections.sort(scores, (s1, s2) -> {
return s1 - s2; });
Collections.binarySearch(cats, key);
String s = list.stream().map(Objects::toString)
.sorted(Comparator.reverseOrder()).collect(Collectors.joining(""));
bfg591 rd16, rd100
https://www.youtube.com/watch?v=fb9FqkYN6kc
радиомикрофон https://www.youtube.com/watch?v=a03rA-KSqHc
супергетеродин 5мкВ 27МГц https://www.youtube.com/watch?v=em5uTnTfgQ0