Skip to content

Instantly share code, notes, and snippets.

View burnedikt's full-sized avatar

Benedikt Reiser burnedikt

View GitHub Profile
@burnedikt
burnedikt / webpack.config.js
Created May 27, 2020 09:33
Using History API with webpack-dev-server
module.exports = {
// ...
output: {
// required for routing to work properly (https://stackoverflow.com/a/56601922/1142028)
publicPath: '/',
},
devServer: {
// required for routing to work properly (https://stackoverflow.com/a/61715643/1142028)
historyApiFallback: true,
// ...
@burnedikt
burnedikt / get-keycloak-users.sh
Created May 8, 2020 13:05
Get users from keycloak
# Requires jq to be installed --> https://stedolan.github.io/jq/
# Create a suitable client supporting "Direct Auth" for your keycloak instance and remember its client credentials (id and secret)
# also see https://developers.redhat.com/blog/2020/01/29/api-login-and-jwt-token-generation-using-keycloak/
CLIENT_ID=test
CLIENT_SECRET=test-secret
USERNAME=admin
PASSWORD=supersecure
KEYCLOAK_URL=https://your.keycloak.com
REALM_NAME=realm
@burnedikt
burnedikt / extract-semantic-version-from-git-tag.ps1
Created September 4, 2018 07:44
Find out semantic version from (annotated) git tag via powershell
# assuming we've got an existing (annotated) git tag like
# git tag -a v1.2.3
$sdkVersion = (git describe --all --match "v*").Split("-")[0].Replace("tags/", "").Replace("v", "")
Write-Output $gitVersion # outputs: 1.2.3
@burnedikt
burnedikt / extract-semantic-version-from-git-tag.sh
Last active September 4, 2018 07:44
Find out semantic version from (annotated) git tag via bash
# assuming we've got an existing (annotated) git tag like
# git tag -a v1.2.3
gitVersion=$(git describe --all --match "v*" --abbrev=0 | cut -c 2-)
echo $gitVersion # outputs: 1.2.3