Skip to content

Instantly share code, notes, and snippets.

View oleksdovz's full-sized avatar

Oleksiy Dovz oleksdovz

View GitHub Profile
@oleksdovz
oleksdovz / debian-systemd-mount-nfs-share.txt
Last active September 29, 2024 19:41
Debian. Mount nfs share using systemd
## File /etc/systemd/system/DATA.mount
[Unit]
Description=nfs mount script
Requires=network-online.target
After=network-online.service
[Mount]
Type=nfs4
@oleksdovz
oleksdovz / vscode-shell-keybinding
Created August 21, 2024 18:32
VS code Keyboard Shortcuts for terminal
For macOS users, you can set the shortcut in the same keybindings.json file.
You can access the file using the shortcut cmd+shift+p, then write/select Preferences: Open Keyboard Shortcuts (JSON).
In keybindings.json, paste the following code between the square brackets:
```
{
"key": "cmd+.",
"command": "runCommands",
"when": "!terminalFocus",
"args": {
"commands": [
@oleksdovz
oleksdovz / gist:fbe53e57c5b52cb8bb2a2ef62ff38369
Created June 24, 2024 07:17
fix-Midnight-Commander-start
alias mc="SHELL=/bin/bash TERM=xterm-256color /opt/homebrew/bin/mc"
@oleksdovz
oleksdovz / k8s-deploy-hello-world.sh
Last active February 28, 2023 17:17
k8s deploy hello-world
#!/bin/sh
# k8s-hello-world
# Kubernetes deployment resources for testing new k8s cluster
kubectl apply -f https://raw.githubusercontent.com/oleksdovz/k8s-hello-world/main/deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/oleksdovz/k8s-hello-world/main/service.yaml
kubectl apply -f https://raw.githubusercontent.com/oleksdovz/k8s-hello-world/main/ingres.yaml
# or
@oleksdovz
oleksdovz / redis-backup-and-restore.md
Last active December 18, 2024 07:56
Redis backup and restore in kubernetes

######################

Case

1 - old redis in k8s cluster #1

2 - fresh install of redis in Cluster #2

  • Target backup data in old cluster and restore in new cluster
@oleksdovz
oleksdovz / screenshot.sh
Created April 4, 2022 16:43
make screenshot of site
#!/bin/bash
# make screenshot of site
google-chrome --headless --no-sandbox --virtual-time-budget=25000 --screenshot https://war.ukrzen.in.ua/alerts
@oleksdovz
oleksdovz / 1_sa-kubeconfig-gen.sh
Created May 9, 2021 14:10 — forked from ragul28/1_sa-kubeconfig-gen.sh
kubeconfig generator script for service account with RBAC.
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, RBAC role file needed
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then
echo "usage: $0 <service_account_name> <namespace> [rbac-role-yaml]"
exit 1
fi