Skip to content

Instantly share code, notes, and snippets.

View sthagen's full-sized avatar
🏔️
above snow inside ☁️

Stefan Hagen sthagen

🏔️
above snow inside ☁️
View GitHub Profile
@sthagen
sthagen / gist:a8324e078d0b5bffbb788e3ed8b00317
Created January 22, 2023 12:28 — forked from ajakk/gist:f5aece4564079513f09f6066238ed6aa
Communication with MaherAzzouzi in #1 of MaherAzzouzi/CVE-2022-37703
I attempted to get MaherAzzouzi to report their apparent information
disclosure vulnerability to Amanda upstream via an issue in their
CVE-2022-37703 repository. They apparently seemed to think that MITRE
automatically reports issues to upstreams, which is not the
case. Eventually, they deleted the issue after threatening to
irresponsibly disclose two local privilege escalations in Amanda, all
without any apparent attempt to notify upstream. As far as I can tell,
that hasn't happened yet.
I've asked Github to make the content of the issue public for
@sthagen
sthagen / vim_crash_course.md
Created July 16, 2022 09:38 — forked from dmsul/vim_crash_course.md
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.

NORMAL MODE

Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

@sthagen
sthagen / spacemacs-keybindings.md
Created May 15, 2022 13:51 — forked from rnwolf/spacemacs-keybindings.md
spacemacs keybindings that i need to learn
@sthagen
sthagen / timed_cache.py
Created March 1, 2022 13:18 — forked from Morreski/timed_cache.py
Python lru_cache with timeout
from datetime import datetime, timedelta
import functools
def timed_cache(**timedelta_kwargs):
def _wrapper(f):
update_delta = timedelta(**timedelta_kwargs)
next_update = datetime.utcnow() + update_delta
# Apply @lru_cache to f with no cache size limit
@sthagen
sthagen / wordle.md
Created February 6, 2022 18:50 — forked from huytd/wordle.md
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@sthagen
sthagen / max_queue_size_pool.py
Created January 17, 2022 08:47 — forked from noxdafox/max_queue_size_pool.py
This code snippet shows how to wrap a concurrent.futures.Executor class to provide a limited queue size.
from threading import BoundedSemaphore
from concurrent.futures import ProcessPoolExecutor
class MaxQueuePool:
"""This Class wraps a concurrent.futures.Executor
limiting the size of its task queue.
If `max_queue_size` tasks are submitted, the next call to submit will block
until a previously submitted one is completed.
@sthagen
sthagen / branch-upstream-changed.sh
Created November 24, 2021 04:43
git local clone follow of remote branch change
git branch -m master main && \
git fetch origin && \
git branch -u origin/main main && \
git remote set-head origin -a
@sthagen
sthagen / dss-x-citations-20210305.md
Created March 8, 2021 06:16
DSS-X Citations-Index as of 2021-03-05 (draft)

Hühnlein, D., Frosch, T., Schwenk, J., Piswanger, C.-M., Sel, M., Hühnlein, T., Wich, T., Nemmert, D., Lottes, R., Somorovsky, J., Mladenov, V., Condovici, C., Leitold, H., Stalla-Bourdillon, S., Tsakalakis, N., Eichholz, J., Kamm, F.-M., Kühne, A., Wabisch, D., Dean, R., Shamah, J., Kapanadze, M., Ponte, N., Martins, J., Portela, R., Karabat, Ç., Stojičić, S., Nedeljkovic, S., Bouckaert, V., Defays, A., Anderson, B., Jonas, M., Hermanns, C., Schubert, T., Wegener, D. & Sazonov, A., (2016). Futuretrust - future trust services for trustworthy global transactions. In: Hühnlein, D., Roßnagel, H., Schunck, C. H. & Talamo, M. (Hrsg.), Bonn: Gesellschaft für Informatik e.V.. (S. 27-41). https://dl.gi.de/bitstream/handle/20.500.12116/602/27.pdf?sequence=1&isAllowed=y

Hühnlein, D., Petrautzki, D., Schmölz, J., Wich, T., Horsch, M., Wieland, T., Eichholz, J., Wiesmaier, A., Braun, J., Feldmann, F., Potzernheim, S., Schwenk, J., Kahlo, C., Kühne, A. & Veit, H., (2012). On the design and implementation of the Open eCa

@sthagen
sthagen / citations.txt
Created March 7, 2021 22:15
Citation list of Digital Signature Services OS Standard
Hühnlein, D., Frosch, T., Schwenk, J., Piswanger, C.-M., Sel, M., Hühnlein, T., Wich, T., Nemmert, D., Lottes, R., Somorovsky, J., Mladenov, V., Condovici, C., Leitold, H., Stalla-Bourdillon, S., Tsakalakis, N., Eichholz, J., Kamm, F.-M., Kühne, A., Wabisch, D., Dean, R., Shamah, J., Kapanadze, M., Ponte, N., Martins, J., Portela, R., Karabat, Ç., Stojičić, S., Nedeljkovic, S., Bouckaert, V., Defays, A., Anderson, B., Jonas, M., Hermanns, C., Schubert, T., Wegener, D. & Sazonov, A., (2016). Futuretrust - future trust services for trustworthy global transactions. In: Hühnlein, D., Roßnagel, H., Schunck, C. H. & Talamo, M. (Hrsg.), Bonn: Gesellschaft für Informatik e.V.. (S. 27-41). https://dl.gi.de/bitstream/handle/20.500.12116/602/27.pdf?sequence=1&isAllowed=y
Hühnlein, D., Petrautzki, D., Schmölz, J., Wich, T., Horsch, M., Wieland, T., Eichholz, J., Wiesmaier, A., Braun, J., Feldmann, F., Potzernheim, S., Schwenk, J., Kahlo, C., Kühne, A. & Veit, H., (2012). On the design and implementation of the Open eCa
import os
from datetime import datetime, timedelta
from typing import Any, Dict, Generator, List, Union
import requests
# Optional - to connect using OAuth credentials
from oauthlib.oauth1 import SIGNATURE_RSA
class JiraClient:
def __init__(