Processing kubectl YAML Output with yq
Source code of snippets included as screenshots at https://mannymon.medium.com/processing-kubectl-yaml-output-with-yq-bf0dc98ddeab
Source code of snippets included as screenshots at https://mannymon.medium.com/processing-kubectl-yaml-output-with-yq-bf0dc98ddeab
# Fix DNS (for Linux) | |
sudo dpkg-reconfigure resolvconf | |
# Find execute command | |
which openconnect | |
/usr/sbin/openconnect | |
# Allow members of group sudo to execute openconnect without passwd | |
sudo visudo | |
Add the follow string |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
#!/usr/bin/env zsh | |
# Quick config my zsh | |
# set -Eeuo pipefail | |
# Fix for Linux TTY | |
if [[ "$OSTYPE" == "linux"* ]]; then | |
sed -i 's/ZSH_THEME="robbyrussell"/if [ "$TERM" = "linux" ]; then\n\ ZSH_THEME="clean"\nelse\n\ ZSH_THEME="robbyrussell"\nfi/' ~/.zshrc | |
echo -e "\nif [ \"\$TERM\" = \"linux\" ]; then\n ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=3'\nelse\n ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=245'\nfi\n" >> ~/.zshrc | |
fi |
#!/usr/bin/env bash | |
# Quick setup my zsh | |
# set -Eeuo pipefail | |
# MultiOS block | |
if [[ $(cat /etc/os-release | grep ID_LIKE) == *"debian"* ]]; then | |
echo -e "\nDebian-based system\n" | |
sudo apt update | |
sudo apt install git zsh fzf thefuck wget -y |
# ~/.config/gtk-3.0/gtk.css | |
decoration, decoration:backdrop { | |
border-radius: 0; | |
border-width: 0; | |
box-shadow: none; | |
margin: 1px; | |
} |
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
cd /etc/mongod.conf
#security:
# authroization: "enabled"
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
We will use minimalistic Linux distribution called Alpine (5MB)
FROM alpine:latest
RUN apk --update add redis