Skip to content

Instantly share code, notes, and snippets.


Bo.Sch. bodsch

View GitHub Profile
bodsch / gist:e3a8fdb2f55d662211346c66e29d3001
Created November 5, 2022 14:50 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:e3a8fdb2f55d662211346c66e29d3001


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
bodsch /
Created October 25, 2022 03:49 — forked from devops-school/
How to Configure Docker client with a configuration file?

Following is a sample config.json file:

  "HttpHeaders": {
    "MyHeader": "MyValue"
  "psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
  "imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
  "pluginsFormat": "table {{.ID}}\t{{.Name}}\t{{.Enabled}}",
bodsch /
Created October 24, 2022 13:45 — forked from jlumbroso/
Side-by-Side Diff Comparison in Python
# Code licensed LGPLv3 by Jérémie Lumbroso <>
import difflib
import itertools
import textwrap
import typing
def side_by_side(
left: typing.List[str],
bodsch /
Created September 5, 2022 17:49 — forked from luanntvn/
Redis health and memory check for Nagios
# Copyright (C) 2014 Samuel Stauffer
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation
bodsch / ansible_replace_the_value_of_dic_variable.yaml
Created February 15, 2022 04:07 — forked from hatsari/ansible_replace_the_value_of_dic_variable.yaml
ansible replace the value of dictionary variable
View ansible_replace_the_value_of_dic_variable.yaml
### ref:
- name: replace the value of dictionary variable
hosts: localhost
gather_facts: no
cmd_check: ok
cmd_name: node1
cmd_status: error
#!/usr/bin/env python3
import docker
import json
# import urllib.request
# client = docker.from_env()
client = docker.DockerClient(base_url='unix://var/run/docker.sock')
#!/usr/bin/env bash
# delete dead containers
docker container prune -f
# keep last 2 builds for each image from the repository
for diru in $(docker images \
--format "{{.Repository}}" | sort | uniq)
for dimr in $(docker images \
bodsch / haproxy.cfg
Created November 29, 2021 10:57 — forked from tikenn/haproxy.cfg
Let's Encrypt Auto-Renewal script for HAProxy
View haproxy.cfg
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
maxconn 2048
bodsch / ST7735
Created November 14, 2021 12:31
empty st7735 display
View ST7735
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
import time
import ST7735
DC = 24
RST = 25
bodsch /
Last active August 11, 2021 13:05 — forked from int128/
Transparent proxy for Docker containers

Transparent proxy for Docker containers

If the Docker host is placed inside a proxy server, it needs to add the proxy configuration to each Dockerfile such as ENV http_proxy.

Following allows transparent access from the container to outside without any proxy configuration.

  1. Set up the transparent proxy
  2. Apply iptables rule for the transparent proxy