Skip to content

Instantly share code, notes, and snippets.

View zar3bski's full-sized avatar
:shipit:
Focusing

zar3bski zar3bski

:shipit:
Focusing
View GitHub Profile
@zar3bski
zar3bski / locator.py
Last active May 4, 2021 15:54
Determine local ipv4 / ipv6 witout any system dependence nor any webservices
from dns.resolver import Resolver
import logging
import argparse
logging.basicConfig(level=logging.INFO)
class Locator(Resolver):
"""A robust way to identify your public ipv4 / ipv6 without any system dependence
usage:
@zar3bski
zar3bski / .gitlab-ci.yml
Created March 13, 2020 13:52
build PDF documentation from README.md [gitlab]
build_doc:
stage: build
image: pandoc/latex:2.9.2
script:
- echo "---" >> headers.md
- "echo 'title: '${CI_PROJECT_TITLE} >> headers.md"
- "echo 'date: '$(date +'%m/%d/%Y') >> headers.md"
- "echo 'header-includes: |' >> headers.md"
- echo " \usepackage{fancyhdr}" >> headers.md
- echo " \pagestyle{fancy}" >> headers.md
@zar3bski
zar3bski / create_db_and_users.sh
Created February 4, 2020 19:56
Initiate multiple database Postgresql Docker
#!/bin/sh
if [ -n "$POSTGRES_DBS" ]; then
IFS=\|
for s in $POSTGRES_DBS ; do
pass=$(echo "$s" | sed 's/.*->//');
user=$(echo "$s" | sed 's/->.*//');
db=$user"_db";
psql --username "$POSTGRES_USER" <<-EOSQL