docker run -d -p 5433:5432 --name postgres -e POSTGRES_PASSWORD=admin -e POSTGRES_USER=adminUser postgres:latest
docker exec -it postgres bash
psql -U adminUser
package cache | |
import ( | |
"sync" | |
"time" | |
) | |
type PollCache[K comparable, V any] struct { | |
data sync.Map | |
pollFunc func() map[K]V |
brew install qrencode | |
qrencode -t utf8 'WIFI:T:WPA;S:network;P:password;;' |
package com.spdeepak.redis; | |
import com.spdeepak.redis.entity.LineItem; | |
import com.spdeepak.redis.entity.Order; | |
import com.spdeepak.redis.repository.LineItemRepository; | |
import com.spdeepak.redis.repository.OrderRepository; | |
import com.spdeepak.redis.service.OrderService; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.boot.ApplicationRunner; | |
import org.springframework.boot.SpringApplication; |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.microsoft.azure.servicebus.Message; | |
import com.microsoft.azure.servicebus.QueueClient; | |
import com.microsoft.azure.servicebus.ReceiveMode; | |
import com.microsoft.azure.servicebus.primitives.ConnectionStringBuilder; | |
import com.microsoft.azure.servicebus.primitives.ServiceBusException; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; |
#1. Start MongoDB container | |
docker run -p 27017:27017 --name macmongo -e MONGO_INITDB_ROOT_PASSWORD=root -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_DATABASE=testdatabase -d mongo:latest | |
#2. Open MongoDB shell | |
docker exec -it macmongo mongo --authenticationDatabase admin -u root -p |
#Start MySQL | |
#MYSQL_ROOT_PASSWORD - for root password | |
#MYSQL_DATABASE - for a startup database | |
#MYSQL_USER, MYSQL_PASSWORD - Now you now what this parameter might be | |
#For more stuff read this page -> https://hub.docker.com/_/mysql/ | |
#1. Start MySQL with a root password, the root admin username will be root | |
docker run --name mysql1 -e MYSQL_ROOT_PASSWORD=root -d mysql:latest | |
#2. Start MySQL without a password. But read the logs to see the password |
public class ConsoleColors { | |
// Reset | |
public static final String RESET = "\033[0m"; // Text Reset | |
// Regular Colors | |
public static final String BLACK = "\033[0;30m"; // BLACK | |
public static final String RED = "\033[0;31m"; // RED | |
public static final String GREEN = "\033[0;32m"; // GREEN | |
public static final String YELLOW = "\033[0;33m"; // YELLOW | |
public static final String BLUE = "\033[0;34m"; // BLUE |