Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
@dasgoll
dasgoll / gist:4df6e2d8af2de5a0375985d17b3760d5
Created June 13, 2023 09:03
keycloak user attribute photo image avatar
Add attribute called 'user_avatar' = https://cdn.icon-icons.com/icons2/1285/PNG/512/female5_85208.png
@dasgoll
dasgoll / gist:1d3b32676f31a2a69d99b27bc03d5110
Created June 10, 2023 08:13
python requests no verify ssl warning
import requests
import urllib3
urllib3.disable_warnings()
r = requests.get('https://localhost:8080/hi', verify=False)
print(r.text)
@dasgoll
dasgoll / gist:dce325f2d0af69827ecf3827ff41b2a8
Created June 2, 2023 13:12
Run SonarQube using Docker
### port 9092 is for H2 database
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
@dasgoll
dasgoll / gist:3c66cebc76d9d6af539c0db9c9ea7d50
Created March 8, 2023 09:22
Install sshpass.exe on Windows
You can install QtdSync for Windows [http://qtdtools.doering-thomas.de/page.php?tool=QtdSync&page=QtdSync&lang=en]
This will contain the sshpass.exe
@dasgoll
dasgoll / gist:5782985251db6e406febc56433c203f8
Created March 6, 2023 11:10
aws ses commandline verify mail send email identity
aws ses send-email --from [email protected] --to [email protected] --text "This is for those who cannot read HTML." --html "<h1>Hello World</h1><p>This is a pretty mail with HTML formatting</p>" --subject "Hello Kaman marrah"
aws ses verify-email-identity --email-address [email protected] --profile digi
FROM adoptopenjdk/openjdk11:jdk-11.0.11_9-debian AS build-env
ENV KEYCLOAK_VERSION 17.0.1
ARG KEYCLOAK_DIST=https://github.com/keycloak/keycloak/releases/download/$KEYCLOAK_VERSION/keycloak-$KEYCLOAK_VERSION.tar.gz
RUN apt-get install -y tar gzip
ADD $KEYCLOAK_DIST /tmp/keycloak/
RUN (cd /tmp/keycloak && \
@dasgoll
dasgoll / docker-compose-keycloak.yaml
Created February 9, 2023 13:51
docker-compose keycloak yaml file
version: '3'
services:
keycloak:
image: quay.io/keycloak/keycloak:20.0.3
ports:
- 8080:8080
command:
- start-dev
environment:
KEYCLOAK_ADMIN: admin
@dasgoll
dasgoll / gist:2fc0122f122bd4e64660c3ef490c2f75
Created February 7, 2023 12:13
Run redis-commander using Docker
docker run --rm --name redis-commander -d -p 8081:8081 --env REDIS_HOSTS=172.17.0.1 ghcr.io/joeferner/redis-commander:latest
@dasgoll
dasgoll / fetch.js
Created November 9, 2022 13:32
Javascript fetch send header authorization token access
fetch('https://reddit.com/v3.1/consents', {
method: 'GET',
headers: {
'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJQUzFzWmYyM3BHaVlaZ2dQSnZFQjlhRjJTS3NOWmdXNFNmSVRkVDRyRXg4In0.eyJleHAiOjE2NjcxMzIwMTQsImlhdCI6MTY2NzEzMTk1NCwianRpIjoiODgxOTZlMTQtMGJkZS00ZjJiLTlhOTEtYWFkOTJlNmU5NzE0IiwiaXNzIjoiaHR0cHM6Ly9rYy5kaWdpdGluYXJ5LmNvbS9hdXRoL3JlYWxtcy9tYXN0ZXIiLCJhdWQiOlsib2ItY2xpZW50MSIsImFjY291bnQiXSwic3ViIjoiZjNhMGJmOTQtMmY4MS00NTVlLThhY2UtN2M5NmU2OTJmYjZlIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoib2ItY2xpZW50MSIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiIiwiaHR0cDovL2VicC1zcGEtd2ViLWRldi5zMy13ZWJzaXRlLmV1LWNlbnRyYWwtMS5hbWF6b25hd3MuY29tIiwiaHR0cHM6Ly90ZXN0LXBsYXRmb3JtLmNsaWNrIl0sInJlYWxtX2FjY2VzcyIasdasdayI6WyJkZWZhdWx0LXJvbGVzLW1hc3RlciIsIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJvYi1jbGllbnQxIjp7InJvbGVzIjpbInVtYV9wcm90ZWN0aW9uIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6ImVtYW
@dasgoll
dasgoll / gist:306c6b9a617a5a142874b7023e46cc82
Created November 9, 2022 12:04
egrep ip address from log using regex
egrep 'from ([0-9]{,3}.[0-9]{,3}.[0-9]{,3}.[0-9]{,3})' /var/log/secure -o |sed 's/from //g' | sort | uniq