Skip to content

Instantly share code, notes, and snippets.

View Jamim's full-sized avatar

Aliaksei Urbanski Jamim

View GitHub Profile
@Jamim
Jamim / force-inet4-or-inet6.c
Created November 30, 2023 00:27 — forked from winny-/force-inet4-or-inet6.c
Force IPv4 or IPv6 in applications such as Lynx
/*
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c
usage: LD_PRELOAD=/path/to/library.so program args ...
This file is in the public domain.
*/
@Jamim
Jamim / docker_descendants.py
Created June 26, 2019 10:16 — forked from altaurog/docker_descendants.py
Python3 script to find descendants of one or more docker images
#!/usr/bin/python3
#
# usage: python3 docker_descendants.py <image_id> ...
import sys
from subprocess import check_output
def main(images):
image_ids = set(images)