Skip to content

Instantly share code, notes, and snippets.

View thmsklngr's full-sized avatar

Thomas Klinger thmsklngr

View GitHub Profile
@nepsilon
nepsilon / how-to-ssh-agent.md
Last active June 3, 2024 05:05
Remember passphrases with ssh-agent — First published in fullweb.io issue #31

How to use ssh-agent to cache your SSH credentials?

Contributed by Fabien Loudet, Linux SysAdmin at Rosetta Stone

Tired of always having to enter your SSH key passphrase when logging in to remote machines? Here comes ssh-agent. Enter the passphrase once and it will keep it in memory for you

Using ssh-agent in your shell session:

@sairamkrish
sairamkrish / object_to_dict_recursive.py
Last active August 24, 2023 23:25
Python object to dictionary - recursively convert
'''
Generic object to dict converter. Recursively convert.
Useful for testing and asserting objects with expectation.
'''
def todict(obj, classkey=None):
if isinstance(obj, dict):
data = {}
for (k, v) in obj.items():
data[k] = todict(v, classkey)
@dorneanu
dorneanu / plugin_architecture.md
Last active July 21, 2024 19:04
Python: Implement basic plugin architecture with Python and importlib

Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).

This is my solution:

Basic project structure

$ tree