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
version: "3.1" | |
services: | |
webserver: | |
networks: | |
- ndsnet | |
scheduler: | |
networks: | |
- ndsnet |
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 mysql.connector | |
from mysql.connector import Error, MySQLConnection | |
def create_connection() -> MySQLConnection: | |
try: | |
connection: MySQLConnection = mysql.connector.connect( | |
host="", | |
database="example", | |
user="admin", |
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
public class ChapterTwoExercises { | |
/* | |
* Binary search implementation, to know the steps necessary only double the | |
* elements and plus 1 | |
* Array 3 = 2 steps | |
* Array 7 = 3 steps | |
* array 15 = 4 steps | |
* array 31 = 5 steps | |
* array 63 = 6 steps |
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
package main | |
// OSI Model Open System Intercommunication Model | |
// You can see the OSI Model as an standard for applications. | |
// Each layer in the OSI model is decoupled from the other layers. | |
// ## SENDER | |
// 7 layers each describe a specific networking component | |
// Layer 7 - Application: HTTP/FTP/gRPC. | |
// Layer 6 - Presentation: Encoding, serialization. |
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 | |
# Program to validate a password | |
if read -t 10 -sp "Enter secret phrase > " secret_pass; then | |
echo -e "\nSecret passphrase was configured" | |
if read -t 10 -sp "Enter the secret phrase again > " secret_pass_two; then | |
if [[ "$secret_pass" == "$secret_pass_two" ]]; then | |
echo -e "\nThe password was validated" |
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 java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.net.URL; | |
import java.util.concurrent.Executor; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
public class RunningTaskWithExecutor { |
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 java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.net.URL; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
public class ExecuteTaskInSeparateThread { | |
private static final Logger logger = Logger.getLogger("App"); |
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
docker stop $(docker ps -aq) | |
docker rm $(docker ps -aq) | |
docker rmi $(docker images -q) | |
docker container prune # Remove all stopped containers | |
docker volume prune # Remove all unused volumes | |
docker image prune # Remove unused images | |
docker system prune # All of the above, in this order: containers, volumes, images | |
docker system df # Show docker disk usage, including space reclaimable by pruning |
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
# In /etc/yum.repos.d/rabbitmq.repo | |
## | |
## Zero dependency Erlang | |
## | |
[rabbitmq_erlang] | |
name=rabbitmq_erlang | |
baseurl=https://packagecloud.io/rabbitmq/erlang/el/8/$basearch | |
repo_gpgcheck=1 |
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
package com.baeldung.springreactivebaeldungseries.lesson01; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.http.HttpMethod; | |
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; | |
import org.springframework.security.config.web.server.ServerHttpSecurity; | |
import org.springframework.security.web.server.SecurityWebFilterChain; | |
@EnableWebFluxSecurity | |
public class EmployeeWebSecurityConfig { |
NewerOlder