https://www.youtube.com/watch?v=6aQgsc0ktIE
Простой повышающий DC-DC преобразователь на советских деталях } * {A simple DC-DC boost converter
https://www.youtube.com/watch?v=6aQgsc0ktIE
Простой повышающий DC-DC преобразователь на советских деталях } * {A simple DC-DC boost converter
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 |
#https://dev.to/viralsangani/be-anonymous-create-your-own-proxy-server-with-aws-ec2-2k63
#1) amazon linux
#2) spot instance (permanent)
#3) key ssh
#4) network group All,ssh,http, https
#!/bin/bash
sudo yum update -y
sudo yum install -y httpd
sudo systemctl start httpd
sudo systemctl enable httpd
cd /var/www/html
sudo sh -c 'echo "hello from $(hostname -f)" > /var/www/html/index.html'
####################
#If you are using Amazon Linux 2023 (AL2023)
# 1. Install compilation tools and dependencies
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y asciidoc
# 2. Download and extract the latest Tinyproxy release
cd /tmp
wget https://github.com/tinyproxy/tinyproxy/releases/download/1.11.1/tinyproxy-1.11.1.tar.gz
tar -xzf tinyproxy-1.11.1.tar.gz
cd tinyproxy-1.11.1
./configure --prefix=/usr --sysconfdir=/etc
make
sudo make install
# 4. Create a systemd service file so it can run as a daemon
sudo tee /etc/systemd/system/tinyproxy.service > /dev/null << 'EOF'
[Unit]
Description=Tinyproxy lightweight HTTP proxy
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
User=nobody
Group=nobody
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
# 5. Create required runtime directory and permissions
sudo mkdir -p /var/run/tinyproxy
sudo chown nobody:nobody /var/run/tinyproxy
#####################
sudo sed -i 's/^Allow 127\.0\.0\.1$/#Allow 127.0.0.1/' /etc/tinyproxy/tinyproxy.conf
sudo sed -i 's/^Allow ::1$/#Allow ::1/' /etc/tinyproxy/tinyproxy.conf
# 6. Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable --now tinyproxy
#curl -i -x http://YOUR_EC2_PUBLIC_IP:8888 http://ifconfig.me
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_directoryvar 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();
###################################