docker network create kong-netdocker run --detach --name kong-db \
--network kong-net \
-e "POSTGRES_DB=kong" \| #!/bin/bash | |
| read -p "Certificates file name: " filename | |
| read -p "Certificates expires (days): " expires | |
| echo $filename | |
| openssl genrsa -out "$filename-key.pem" 2048 | |
| openssl req -new -key "$filename-key.pem" -out "$filename-csr.pem" | |
| openssl x509 -req -days $expires -in "$filename-csr.pem" -signkey "$filename-key.pem" -out "$filename-certs.crt" | |
| openssl pkcs12 -export -out "$filename-pfx.pfx" -inkey "$filename-key.pem" -in "$filename-certs.crt" |
| #!/bin/bash | |
| git config --global user.name "your_account" | |
| git config --global user.email "your_account@email.local" | |
| git config --global credential.helper cache | |
| git config --global credential.helper 'cache --timeout=604800' | |
| git config -l | |
| # 1 day 86400 second | |
| # 7 day 604800 second |
| version: '3.7' | |
| services: | |
| wp-db: | |
| image: mariadb | |
| volumes: | |
| - ./wp-db:/var/lib/mysql | |
| - /etc/localtime:/etc/localtime:ro- | |
| - /etc/timezone:/etc/timezone:ro | |
| networks: |
| # login as Global Admin Account | |
| $User = "global_admin_account@domain.com" | |
| $PWord = ConvertTo-SecureString -String "global_admin_password" -AsPlainText -Force | |
| $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord | |
| $teamsurl = "https://link_to_event" # Link to event | |
| # $cred = Get-Credential | |
| Connect-AzureAD -Credential $cred | |
| Connect-MsolService -Credential $cred |
| $User = "global_admin_account@domain.com" | |
| $PWord = ConvertTo-SecureString -String "global_admin_password" -AsPlainText -Force | |
| $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord | |
| $exosession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid -Credential $cred -Authentication Basic -AllowRedirection | |
| Import-PSSession $exosession | |
| Get-Mailbox -Identity "email_users@domain.com" | select UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward |
esxcli system snmp get
esxcli system snmp set --communities PUBLIC
esxcli system snmp set --syslocation "LOCATION"
esxcli system snmp set --syscontact email@domain.local
esxcli system snmp set --enable true
esxcli system snmp get| import subprocess | |
| import cv2 | |
| # re-stream rtmp url | |
| rtmp_url = "rtmp://xxx.xxx.xxx.xxx:1935/stream/publish" | |
| # source rtmp url | |
| source_path = "rtmp://xxx.xxx.xxx.xxx:1935/stream/test" | |
| cap = cv2.VideoCapture(source_path) | |
| # gather video info to ffmpeg | |
| fps = int(cap.get(cv2.CAP_PROP_FPS)) |
| import cv2 | |
| cap = cv2.VideoCapture(0) | |
| # gather video info to ffmpeg | |
| fps = int(cap.get(cv2.CAP_PROP_FPS)) | |
| width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) | |
| height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) | |
| # face detection |