Skip to content

Instantly share code, notes, and snippets.

View guimar86's full-sized avatar
🇦🇴
Aspire to inspire before we expire

Renato Martins guimar86

🇦🇴
Aspire to inspire before we expire
View GitHub Profile

Spring data database properties

spring.datasource.url=jdbc:postgresql:conference_app
spring.datasource.username=postgres
spring.datasource.password=Welcome
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.dll-auto=none
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.show-sql=true

Verify IIS Configuration 2

Print a list of all web features Get-WindowsFeature -Name Web*| Where Installed | Select-Object Name

Set the result list in a variable

$desiredFeatures=@( "web-server", "web-webServer" )

Verify IIS Configuration

This is a powershell script

if((Get-WindowsFeature Web-Server).InstallState -ne "Installed"){
  Write-Host "Failed, IIS not installed " - ForegroundColor Red
  break
}else{
  Write-Host "Pass IIS is installed " -ForegroundColor Green
}

How to stop IIS via command line

net stop was /y

How to start IIS via command line

net start w3svc

@guimar86
guimar86 / Keycloak .NetCore.md
Last active March 27, 2022 12:36
KeyCloak .NetCore setup

Setup Keycloack with .NetCore

using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http;