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
name: Elixir CI
on: push
jobs:
build:
runs-on: ubuntu-latest
container:
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__(
@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 / 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.

@ajakk
ajakk / gist:f5aece4564079513f09f6066238ed6aa
Last active January 22, 2023 12:28
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 / 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
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__(
@Morreski
Morreski / timed_cache.py
Last active December 21, 2023 18:17
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
@rnwolf
rnwolf / spacemacs-keybindings.md
Last active February 24, 2024 08:45 — forked from kiambogo/spacemacs-keybindings
spacemacs keybindings that i need to learn
@Patazerty
Patazerty / hsmghpg.rst
Created July 3, 2023 09:16
Nitrokey HSM 2 GPG setup

Nitrokey HSM GPG setup

I was investigating the use of Hardware Security Modules (HSMs) to better secure some stuff at work. Our choice was a Nitrokey HSM 2 for its convenient price, features and open approach, including hardware. Unfortunately Nitrokeys's documentation is sparse at best and there is not much available documentation online to guide new users to get HSMs to work with GnuPG (GPG): it's even the opposite with some forum posts indicating that the Nitrokey HSM 2 is not compatible with GPG.

From what seems to be the current state of things, GPG works out of the box with OpenPGP cards (which are