Skip to content

Instantly share code, notes, and snippets.

View Dzordzu's full-sized avatar
🐢
I may be slow to respond.

Tomasz Durda Dzordzu

🐢
I may be slow to respond.
  • Wrocław University of Science and Technology
View GitHub Profile
@Dzordzu
Dzordzu / restarts.py
Created July 11, 2022 11:45
Checks if restarts are defined within docker-compose
# License at the end of file
import yaml
from pathlib import Path
import argparse
def check_service(service_yaml, pth, service_name):
if "restart" not in service_yaml:
print(f"No restart policy is defined for service '{service_name}' in {pth}")
elif service_yaml["restart"] not in ["always", "unless-stopped"]:
@Dzordzu
Dzordzu / LICENSE
Last active November 6, 2021 11:53
puml-generate
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
@Dzordzu
Dzordzu / cyborgy-theme.puml
Last active July 12, 2021 07:55
cyborgy-theme.puml
''
'' Cyborg theme based off of the bootstrap theme of the same name
'' https://bootswatch.com/cyborg/
''
'' Original Author: Brett Schwarz
'' Original Copyright (c) 2019 by Brett Schwarz (MIT)
''
'' Author: Tomasz Durda
'' Copyright (c) 2021 by Tomasz Durda (MIT)
@Dzordzu
Dzordzu / Semver - git hook usage
Last active May 11, 2021 22:50
Semver - git hook
1. Enter your git repository
2. Enter `.git/hooks`
3. Paste scripts or extend existing ones
You may want to change `semver_update` function within `commit-msg`. Feel free to change versions in other files than README.md
python3 /usr/lib/nagios/plugins/check_docker --containers "($(docker ps -a | grep -v Running | grep -v CONTAINER | awk 'BEGI
N {ORS="|";FS=" {2,}"} {print $6}'))" --cpu 75:90
@Dzordzu
Dzordzu / info.md
Last active July 4, 2019 11:15
SSH key auto add

SSH Key Auto Add

Note

Use ansible instead

WARNING!

It uses eval

Description

@Dzordzu
Dzordzu / vulgarisms
Last active April 25, 2022 08:27
Polish vulgar words regex
((?:w|wy|za|po|przy|z|s|pod|do|od|na|o|roz|ros|nad)?(?:jeb|w?kure?w(?:ysyn|skie|isz)?|pierd[oa]l|dup(?:cz)?|c?huj|c?hój|srań|pizd|rucha(?:ńsk(?:[oau]|iem)|n)?|szmac|szmato?)(?:o|i[eo]?(?:n[yai])?||ow[eayo]|owion[aye]|onych|on[yea]|nąć|anymi|anie|n[aye]|an[yiaeą]|ańc[eu]|wsz[ay]|ili|iły|ił[oa]?|ion[yae]|iście|i?a?[ćę]|c?ów|c?u|ie(?:my|sz)|[aąyeę])?|sesja|gówn(?:[ao]|om|ie|ian[eay])|dziwk(?:a(?:rski|rz|rka)?|i|om?|ce)|su(?:kowat[eayo]|k[aio]|ce))
@Dzordzu
Dzordzu / code.js
Last active June 3, 2018 22:11
Accessible navbar (VanillaJS + BEM)
// Example of the Trigger usage
function toggle(trigger, target) {
if(target.classList.contains("navbar__dropdown--hidden")){
target.classList.remove("navbar__dropdown--hidden");
target.querySelector("a").focus();
}
else {
target.classList.add("navbar__dropdown--hidden");
}