A collection of tools, configs and code snippets that proved to be useful in various situations.
The repository is organized (roughly) by tech stack:
-
Shell: Helpers for working with the Unix shell
- use a setup file collect often-used variables and functions in a dedicated file
- colored messages/log levels enable color-coded debug/info/warn/error messages in shell scripts
- user queries use interactive prompts in scripts
- string handling use arrays to safely process and parse strings
- how to rsync short examples of common rsync invocations
-
Configuration: Convenience settings for common system services
- ssh config use custom shortcuts to set up ssh connections
-
Python: Code snippets and examples to get the most out of Python
- colored logging use custom color-coded logging in your Python scripts
-
Databases: Configuration and initialization of common database systems
- SQLite tuning use sensible defaults to speed up SQLite
-
Documentation: Templates for project documentation and organization
- README Exemplary README for a project repository
- CHANGELOG Exemplary CHANGELOG for a project repository
- Git Style Guide A suggestion for formatting git commits
- Research Project Folder Layout Exemplary directory structure for a research project
Suggestions for snippets to add? Let us know!
Either use the above index or simply browse the repository. If you find anything interesting feel free to copy-paste the respective parts (please include the license note at the top of the corresponding file).
This repository is a collection of code snippets, common configuration stubs and templates that have been collected over the years by the ESI IT Software Support Group. The objective of this project is to save time and/or reduce mental load trying to answer the ever-recurring question:
"I need to do x here. I remember I have done something similar before, but where was that again..?"
Thus, everything in this repository is general enough that it has been used at least twice in the past, but still specific enough that cooking it up from scratch is not effortless.
The polytopical nature of this repository doesn't really lend itself to provide general purpose installation instructions. If you need to tune your SQLite database, you probably already have SQLite set up and running on your system. If you're looking for a way to better structure status messages in Bash, you're probably already working in Bash. Thus, no single "installation" is required to use the things collected in here, however, almost all bits and pieces require some kind of base technology (e.g., SQLite, Bash) to be available on your system. Please refer to the respective official documentation to set up the corresponding components.
The notable exception to this rule is the provided Python section,
which comes with a conda environment file to quickly
set up all required packages (including other tools like sqlite used in the
repository).
Find what you need by browsing the repository or skimming the index at the top. Then simply copy-paste the parts that seem useful to you (please include the license note at the top of the corresponding file).
If you have questions or find bugs/inconsistencies, please open an issue.
Due to the nature of this project, we are not using releases or milestones. However, we plan to extend this repository everytime we find ourselves asking the above mentioned "Where was that again?..." question.
Contributions are always welcome! Feel free to open an issue to propose changes/additions. Alternatively, you can also fork this repository, and open a pull request.
Initial version put together by Stefan Fürtinger.
This project is actively maintained and on occasion updated.