From a feature branch, apply only the latest commit on top of the latest main
branch — and discard all earlier commits in that branch.
This guide explains how to set up automated code formatting in a Java Maven project using Google's Java code formatter via the fmt-maven-plugin
.
The setup combines two key components:
- Google Java Format (google-java-format): Google's Java code formatter that enforces Google Java Style
- Spotify's fmt-maven-plugin: A Maven plugin that integrates google-java-format into the Maven build lifecycle
This file contains hidden or 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
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.suggestSelection": "first", | |
"editor.rulers": [160], | |
"files.exclude": { | |
"**/.classpath": true, | |
"**/.project": true, | |
"**/.settings": true, | |
"**/.factorypath": true | |
}, |
REST (Representational State Transfer)
REST is a standard for designing networked applications. It uses HTTP methods to implement the concept of CRUD (Create, Read, Update, Delete).
When to use REST:
- Public APIs for third-party developers : REST is widely adopted and understood by many developers, making it a good choice for public APIs.
- Microservices with HTTP/JSON : If your microservices are lightweight and primarily use HTTP/JSON, REST can be a good choice.
- Stateless operations : REST is stateless, meaning each HTTP request happens in complete isolation. When the client makes an HTTP request, it includes all information necessary for the server to fulfill that request.
- Cacheable data : If your application serves data that can be cached to improve performance, REST can be a good choice because HTTP supports caching out of the box.
- Web applications : REST is a good fit for web applications, especially when combined with JavaScript frameworks like Angular or Reac
.\yt-dlp.exe --cookies .\youtube.com_cookies.txt -f "mp4" -o "%(playlist_index)s-%(title)s.%(ext)s"
This file contains hidden or 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
# 1. RDP into the VM | |
# 2. Open PowerShell in Administrator Mode. | |
# 3. Run the command ‘Set-ExecutionPolicy Unrestricted’. | |
# 4. Create a powershell script called ‘windows-invm-notification.ps1’ and copy the following content in the file. | |
DO | |
{ | |
Invoke-WebRequest http://169.254.169.254/metadata/scheduledevents?api-version=2019-01-01 -H @{"Metadata"="true"}; | |
Start-sleep -Seconds 2; | |
} While ($true) |
This file contains hidden or 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 | |
while true | |
do | |
echo " Press [CTRL+C] to stop.." | |
curl -H Metadata:true "http://169.254.169.254/metadata/scheduledevents?api-version=2019-01-01" | |
sleep 2 | |
done |
NewerOlder