apiVersion: v1
kind: ServiceAccount
metadata:
name: martindev-sa
namespace: kube-system
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 JDK8: | |
sudo apt install openjdk-8-jdk | |
# If multiple java versions are installed you can switch between the versions: | |
sudo update-alternatives --config java | |
# See currently running java version | |
java -version |
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
## Run shell as admin | |
## Enable scripts on your system | |
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser | |
cd C:\Users\admmalu\Git\Infrastructure\UserManagement | |
.\AppPermGroupsCreateGroups.ps1 -shortAppName "GQL" -longAppName "GraphQL" -azureResource -aksResource -whatif | |
.\AppPermGroupsCreateGroups.ps1 -shortAppName "GQL" -longAppName "GraphQL" -azureResource -aksResource | |
## Disable scripts on your system | |
Set-ExecutionPolicy -ExecutionPolicy Restricted -Scope CurrentUser |
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
# grep modules | |
ansible-doc -l | grep docker | |
# one-off commands (ad hoc commands) | |
# ansible [pattern] -m modulename -a "module options" | |
ansible webservers -m service -a "name=httpd state=restarted" | |
ansible all -m firewalld -a "service=https permanent=yes state=enabled" -b | |
# use -b to elevate as root -> in playbook "become: yes" | |
# deploy nginx via a playbook |
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
az acr repository show --name btcsacr --image myapp:v1 | |
# Unlocked it: | |
az acr repository update --name btcsacr --image myapp:v1 --write-enabled true --delete-enabled true | |
az acr repository update --name btcsacr --image myapp@sha256:436519e38d07508ed8e68214fea9824f4867009c185771fb3e5 --write-enabled true --delete-enabled true |
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
# bind server with wildcard record | |
docker run -d -e WILDCARD_DNS='luksa=192.168.0.153' -p 80:53/udp martindocker22/bind:latest | |
# clean up disk with cron | |
#!/bin/bash | |
set -o xtrace | |
sudo sh -c ' | |
cat << EOF > /etc/cron.d/docker_image_prune | |
0 2 * * * vsts /usr/bin/docker rm $(/usr/bin/docker ps --filter status=exited -q) > /tmp/docker_rm.log 2>&1 |
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
git pull | |
# create and checkout | |
git checkout -b urls | |
# only checkout | |
git checkout urls | |
git add --all | |
git add ./myfile | |
git commit -m "message" | |
git push | |
git fetch |
Data Source=<servername>.database.windows.net;Initial Catalog=<dbname>;User ID=<svcaccount>;Password=<PW>;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;MultipleActiveResultSets=true
- Master:
Create login svc_deploy with password = '';
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
# Kernel version of a Linux system | |
uname -a | |
# Check if lib is installed | |
ldconfig -p | grep libgtk | |
# Services | |
service <service name> status (old school) | |
systemctl status <service name> |
OlderNewer