Skip to content

Instantly share code, notes, and snippets.

View dragolabs's full-sized avatar

Vitaly Shishlyannikov dragolabs

View GitHub Profile
# Enable ALT + Left/Right for navigation between words
"\e\e[D": backward-word
"\e\e[C": forward-word
# Search in bash history when type
"\e[A": history-search-backward
"\e[B": history-search-forward
# Allow the command prompt to wrap to the next line
set horizontal-scroll-mode Off
@dragolabs
dragolabs / vaultwarden-docker-compose.yml
Created October 13, 2023 07:30
vaultwarden + traefik + cloudflare dns
---
version: '3'
services:
vaultwarden:
image: vaultwarden/server:1.29.2
container_name: vaultwarden
restart: always
environment:
WEBSOCKET_ENABLED: true # Enable WebSocket notifications.

Setapp software free alternatives

  • Bartender - Dozer
  • DisplayBuddy - MonitorControl
  • iStat - Stats
  • .. - MeetingBar

Ansible role with testing

Install ansible and tools

pipx install --include-deps yamllint
pipx install --include-deps ansible
pipx install --include-deps "ansible-lint[community,yamllint]"
pipx install --include-deps "molecule[docker]"
pipx inject --include-apps ansible ansible-lint

How to install python apps on MacOS

Install brew

Install asdf

brew install asdf
@dragolabs
dragolabs / Dockerfile.sslh
Last active December 4, 2020 15:54
Dockerfile to build sslh container
FROM ubuntu:18.04 as base
RUN apt update && \
apt upgrade -y && \
apt install -y libc6 libcap2 libconfig9 libwrap0 \
debconf init-system-helpers adduser lsb-base update-inetd
FROM base as build
RUN apt install -y libwrap0-dev libconfig-dev libpcre3-dev git
RUN git clone https://github.com/yrutschle/sslh.git
RUN cd sslh && \
@dragolabs
dragolabs / docker-compose-adguard.yml
Created November 27, 2020 11:48
AfGuard Home docker compose
version: '3.7'
services:
adguard-home:
container_name: adguard-home
image: adguard/adguardhome:v0.104.1
restart: always
cap_add:
- NET_ADMIN
volumes:

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@dragolabs
dragolabs / fix-sectigo-ca-expired.sh
Created May 31, 2020 07:18
Fix expired sectigo ca certificate on ubuntu =< 16.04 and debian =< 9
#!/bin/bash
# more info:
# https://support.sectigo.com/articles/Knowledge/Sectigo-AddTrust-External-CA-Root-Expiring-May-30-2020
# https://www.reddit.com/r/linux/comments/gshh70/sectigo_root_ca_expiring_may_not_be_handled_well/
apt-get update
apt-get install --reinstall ca-certificates
sed -i '/AddTrust_External_Root.crt/d' /etc/ca-certificates.conf
rm /usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt
update-ca-certificates -f -v
@dragolabs
dragolabs / mc-wrapper.sh
Created May 6, 2020 20:40
Stay in the current directory after closing mc
# Midnight Commander magic
if [ -f /usr/local/opt/midnight-commander/libexec/mc/mc-wrapper.sh ]; then
alias mc='. /usr/local/opt/midnight-commander/libexec/mc/mc-wrapper.sh'
elif [ -f /usr/lib/mc/mc-wrapper.sh ]; then
alias mc='. /usr/lib/mc/mc-wrapper.sh'
fi