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
@ApplicationPath("/") | |
public class ApplicationConfig extends Application { | |
@Override | |
public Set<Class<?>> getClasses() { | |
Set<Class<?>> resources = new HashSet<>(); | |
resources.add(HelloResource.class); | |
return resources; | |
} | |
} |
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
# Method: POST | |
# Headers | |
# Authorization Bearer eyJhbGciO... (access token) | |
# Content-Type: application/json | |
# Body | |
# { | |
# "username": "test-user", | |
# "groups": ["Comp1"], // doesn't work, even if it is in the docs | |
# "lastName": "test", |
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
# Method: POST | |
# Headers | |
# Content-Type: application/x-www-form-urlencoded | |
# Authorization Basic encoded(client_id:secret) | |
# Body | |
# grant_type client_credentials | |
http://127.0.0.1:8088/auth/realms/app/protocol/openid-connect/token |
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
{"lastUpload":"2020-05-20T09:48:34.306Z","extensionVersion":"v3.4.3"} |
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
true &>/dev/null </dev/tcp/127.0.0.1/$PORT && echo open || echo closed |
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
{ | |
"realm": "demo", | |
"auth-server-url": "https://home.localdomain:8443/auth", | |
"ssl-required": "external", | |
"resource": "test", // this is client id | |
"public-client": true, | |
"truststore": "classpath:/keycloak.jks", //keycloak.jks is in src/main/resources/keycloak.jks | |
"truststore-password": "secret", | |
"client-keystore" : "/usr/demo/keycloakPub.jks", //keycloak.jks is on the server under /usr/demo/keycloak.jks | |
"client-keystore-password" : "secret", |
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 powershel | |
$client= ((New-Object System.Net.WebClient)); //https://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.110).aspx | |
$client.Proxy = ((New-Object System.Net.WebProxy("http://127.0.0.1:3128"))); //or set the credentials if you don't use cntlm | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex $client.DownloadString('https://chocolatey.org/install.ps1') |
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
# Install sshd | |
RUN apt-get update && apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
# SSH login fix. Otherwise user is kicked off after login | |
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | |
ENV NOTVISIBLE "in users profile" | |
RUN echo "export VISIBLE=now" >> /etc/profile | |
EXPOSE 22 |
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
@echo off | |
ECHO "Start php-cs-fixer" | |
setlocal EnableDelayedExpansion | |
set CHANGED_FILES= | |
for /f "tokens=*" %%i in ('hg st -m -a -n ^| FINDSTR /s .php' ^| FINDSTR /V vendor) do ( | |
set "CHANGED_FILES=!CHANGED_FILES! %%i" | |
) | |
IF "%CHANGED_FILES%" NEQ "" ( | |
ECHO "It has changed files that need to be checked!" | |
SET "EXTRA_ARGS=--%CHANGED_FILES%" |
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 | |
CHANGED_FILES=$(hg status -m -a -n | grep "**.php$" | grep -v "vendor"); | |
printf "Files to be checked:\n\n"; | |
echo "$CHANGED_FILES"; | |
printf "\n" | |
if [[ -n "$CHANGED_FILES" ]] | |
then | |
EXTRA_ARGS=('--' ${CHANGED_FILES[@]}); |
NewerOlder