Skip to content

Instantly share code, notes, and snippets.

@mbodo
mbodo / README-setup-socket-activated-systemd-service.md
Created September 15, 2018 14:16 — forked from drmalex07/README-setup-socket-activated-systemd-service.md
An example inetd-like socket-activated service. #systemd #inetd #systemd.socket

README

This is an example of a socket-activated per-connection service (which is usually referred to as inetd-like service). A thorough explanation can be found at http://0pointer.de/blog/projects/inetd.html.

Define a socket unit

The key point here is to specify Accept=yes, which will make the socket accept connections (behaving like inetd) and pass only the resulting connection socket to the service handler.

@mbodo
mbodo / curl.md
Created May 13, 2018 19:27 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@mbodo
mbodo / tmux.md
Created April 20, 2018 08:44 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@mbodo
mbodo / docker.md
Last active September 27, 2019 15:03
Docker notes/cheatsheet

Docker

Images

Remove all images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              fce289e99eb9        4 months ago        1.84kB

$ docker rmi $(docker image ls --format "{{.ID}}")
@mbodo
mbodo / kvm.md
Last active May 1, 2024 19:35
KVM Cheatsheet

QEMU/KVM Cheatsheet

Create KVM image with virt-build

cd /var/lib/libvirt/qemu/

sudo virt-builder fedora-26 \
--arch x86_64 \
--size 20G \
-m 8192 \
@mbodo
mbodo / after
Created April 5, 2017 11:07 — forked from myst3k/after
enable on boot nodemanager and adminserver weblogic 12c
#enable each service for boot
systemctl enable nodemanager
systemctl enable adminserver
#then reboot and test
@mbodo
mbodo / Ansible - Cheatsheet.md
Last active March 11, 2019 15:35 — forked from aleixripoll/ansible-tips.md
Ansible tips

Ansible - Cheatsheet

ansible-galaxy

Playbook template init with ansible-galaxy

ansible-galaxy init roles/myrole

ansible-playbook