Skip to content

Instantly share code, notes, and snippets.

Avatar
🏀

Tom Emv getsueineko

🏀
View GitHub Profile
@getsueineko
getsueineko / README.md
Created Jul 5, 2022 — forked from montmanu/README.md
Processing kubectl YAML Output with yq
View README.md
View Quick tuning openconnect.txt
# 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
@getsueineko
getsueineko / ffmpeg.md
Created Jan 16, 2022 — forked from whizkydee/ffmpeg.md
using ffmpeg to extract audio from video files
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

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:

View quick-config-my-zsh.sh
#!/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
View quick-setup-my-zsh.sh
#!/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
@getsueineko
getsueineko / gist:1f0d281137f27828b2b3bc17f2dd7c56
Created Oct 29, 2021
Fix visible borders in VirtualBox seamless mode (GNOME)
View gist:1f0d281137f27828b2b3bc17f2dd7c56
# ~/.config/gtk-3.0/gtk.css
decoration, decoration:backdrop {
border-radius: 0;
border-width: 0;
box-shadow: none;
margin: 1px;
}
View gist:7c249d9981f6246cd7c911bf715f5229
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@getsueineko
getsueineko / mongodb_pass_reset.md
Created Sep 24, 2021 — forked from shivampip/mongodb_pass_reset.md
MongoDB shell admin password reset
View mongodb_pass_reset.md
  • open mongod.conf
cd /etc/mongod.conf
  • Comment security
#security:
#  authroization: "enabled"
@getsueineko
getsueineko / read-access.sql
Created Aug 31, 2021 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
View read-access.sql
-- 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;
@getsueineko
getsueineko / howto.md
Created Aug 16, 2021 — forked from petrkohut/howto.md
How to have redis-cli and psql installed on machine using Docker
View howto.md

How to install redis-cli and psql client on your machine with Docker

Preparing docker images

We will use minimalistic Linux distribution called Alpine (5MB)

Dockerfile of redis-cli

FROM alpine:latest
RUN apk --update add redis