Skip to content

Instantly share code, notes, and snippets.

local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.color_scheme = 'Aci (Gogh)'
local act = wezterm.action
config.keys = {
{ key = 'v', mods = 'CTRL', action = act.PasteFrom 'Clipboard' },
}
return config
@cdpb
cdpb / .tmux.conf
Last active November 1, 2024 19:30
# Settings
## start counting tmux sessions from 1
set -g base-index 1
setw -g pane-base-index 1
## increase history
set -g history-limit 50000
## Refresh 'status-left' and 'status-right' more often
set -g status-interval 5
@cdpb
cdpb / gist:fd2dbecdb4a08d79da6c08d8a65dd97c
Last active December 17, 2023 21:37
Vivaldi (Chrome) and KeePassXC Flatpak Integration for Browser

Inspired by this

# modify keepassxc browser path
In the KeePassXC UI.
- Tools
  - Settings
    - Browser Integration
      - General
        - Enable Browser Integration
@cdpb
cdpb / Dockerfile
Created December 3, 2017 17:04
Generate useless random docker names and make it available via http
FROM alpine
COPY names-generator /
EXPOSE 8080
CMD ["/names-generator"]
@cdpb
cdpb / log_dynamic_dns.sh
Created December 2, 2017 09:58
Log dynamic dns records
#!/bin/bash
# first A record, second authoritive DNS
RECORDS=(example.com ns.example.com mustermann.de ns.google.de)
LOGPATH="/var/log/iplog"
COUNTER=1
for RECORD in ${RECORDS[@]}; do
if [[ ! $(($COUNTER % 2)) -eq 0 ]]; then
DOMAIN=$RECORD
@cdpb
cdpb / mkimage.sh
Created November 5, 2016 09:34
Build Debian / Raspbian ARM - Raspberry
#!/bin/bash
# Usage: ./mkimage.sh jessie
MIRROR="http://archive.raspbian.org/raspbian"
RELEASE="$1"
TAG="debian:$RELEASE"
DIR=$(mktemp -d)
debootstrap --variant=minbase $RELEASE $DIR $MIRROR
tar --numeric-owner -C $DIR -c . | docker import - $TAG
# Generate SSL
openssl req -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 -out domain.crt
# Generate DH
openssl dhparam -out dhparam.pem 4096
ssl_certificate /etc/nginx/ssl/domain.crt;
ssl_certificate_key /etc/nginx/ssl/domain.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
@cdpb
cdpb / nginx.conf
Last active March 28, 2016 08:37
OBSOLET Radicale Alpine dev
# Radicale Dockerfile
#
# VERSION 0.3
FROM alpine:latest
# Base packages
RUN apk update && apk upgrade
RUN apk add ca-certificates python nginx py-setuptools apache2-utils
@cdpb
cdpb / gist:9f57735839b369197ed6
Created February 17, 2016 08:44
Radicale Alpine
# Radicale Dockerfile
#
# VERSION 0.3
FROM alpine:latest
# Base packages
RUN apk update && apk upgrade
RUN apk add ca-certificates git python python-dev py-setuptools py-pip build-base libffi-dev
@cdpb
cdpb / gist:7aabf3f0d600e794ee19
Created February 16, 2016 08:58
Block scan servers persistent OpenBSD pf
#!/bin/ksh
LOG="/tmp/access_pot.log"
BLACKLIST="/root/config/pf/persistent-block.list"
set -A RFCS 10 172 192
while true; do
if [[ -a $LOG ]]; then
tail -f $LOG | while read LINE; do