Skip to content

Instantly share code, notes, and snippets.

@lrbnew
lrbnew / playbook_centos_install_docker.yaml
Created April 3, 2019 12:26 — forked from yonglai/playbook_centos_install_docker.yaml
An Ansible playbook to install docker-ce on Centos
---
- name: Install docker
gather_facts: No
hosts: default
tasks:
- name: Install yum utils
yum:
name: yum-utils
state: latest
@lrbnew
lrbnew / cluster.sh
Created April 8, 2019 10:56 — forked from cizixs/cluster.sh
Create swarm cluster in one command.
#!/bin/bash
# This script helps to create a develop docker swarm cluster in one command
# For explanations and details, please refer to https://docs.docker.com/engine/userguide/networking/get-started-overlay/
set -e
create_kv() {
echo Creating kvstore machine.
docker-machine create -d virtualbox \
kvstore
@lrbnew
lrbnew / proc_net_tcp_decode
Created January 3, 2020 09:29 — forked from jkstill/proc_net_tcp_decode
decode entries in /proc/net/tcp
Decoding the data in /proc/net/tcp:
Linux 5.x /proc/net/tcp
Linux 6.x /proc/PID/net/tcp
Given a socket:
$ ls -l /proc/24784/fd/11
lrwx------ 1 jkstill dba 64 Dec 4 16:22 /proc/24784/fd/11 -> socket:[15907701]