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
| #!/bin/bash | |
| OWNER="$1" | |
| REPO="$2" | |
| if [[ -z "$OWNER" || -z "$REPO" ]]; then | |
| echo "Usage: ./run.sh <GitHub-Owner> <GitHub-Repo>" | |
| exit 1 | |
| fi |
| 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 |