Skip to content

Instantly share code, notes, and snippets.

View chief93's full-sized avatar

Alex Furnica chief93

  • Moldova, Chisinau
View GitHub Profile

Keybase proof

I hereby claim:

  • I am chief93 on github.
  • I am alex025 (https://keybase.io/alex025) on keybase.
  • I have a public key ASCKLszA8Uavbfg6ZNMC958NdsH_7Z2VkCS_v4ofgiFOuwo

To claim this, I am signing this object:

@chief93
chief93 / docker-compose proxy.md
Last active January 10, 2021 15:42
Docker-compose TCP proxy

Originated from https://github.com/hpello/tcp-proxy-docker For proxying a TCP connection for an already running container, spawned by Docker-compose, that didn't exposed it's port, use following:

  1. Find your composed container' network:
docker network list
  1. Open a <proxy_port> on your host which will forward connection to <container_port> in your <container_name>:
@chief93
chief93 / dump.sh
Created June 23, 2017 20:04 — forked from widnyana/dump.sh
Dump Current Nginx Config
# Set pid of nginx master process here
pid=8192
# generate gdb commands from the process's memory mappings using awk
cat /proc/$pid/maps | awk '$6 !~ "^/" {split ($1,addrs,"-"); print "dump memory mem_" addrs[1] " 0x" addrs[1] " 0x" addrs[2] ;}END{print "quit"}' > gdb-commands
# use gdb with the -x option to dump these memory regions to mem_* files
gdb -p $pid -x gdb-commands
# look for some (any) nginx.conf text
moment.tz.add({
"zones": {
"Africa/Algiers": [
"0:12:12 - LMT 1891_2_15_0_1 0:12:12",
"0:9:21 - PMT 1911_2_11 0:9:21",
"0 Algeria WE%sT 1940_1_25_2",
"1 Algeria CE%sT 1946_9_7 1",
"0 - WET 1956_0_29",
"1 - CET 1963_3_14 1",
"0 Algeria WE%sT 1977_9_21 1",