From e4ccaf4bd93901db13af23c383e53d710f5186b5 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Mon, 23 Nov 2020 14:45:00 -0500 Subject: [PATCH] Update READMEs --- README.md | 10 ++++++++- ansible/README.md | 18 +++------------ ansible/plays/README.md | 8 +++++++ ansible/roles/README.md | 35 +++++++++++++++-------------- cpp/README.md | 25 +++++++++++++++++++++ cpp/datastructs/README.md | 20 +++++++++++++++++ cpp/datastructs/templates/README.md | 14 ++++++++++++ scripts/README.md | 10 +++++++-- 8 files changed, 105 insertions(+), 35 deletions(-) create mode 100644 ansible/plays/README.md create mode 100644 cpp/README.md create mode 100644 cpp/datastructs/README.md create mode 100644 cpp/datastructs/templates/README.md diff --git a/README.md b/README.md index 4daaec5..0acd436 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,12 @@ # klips -This repository is a collection of code snippets and configurations. This can be cloned or just viewed and copied as needed to lay out templates or automate tasks for larger projects. +This repository is a collection of useful code snippets and configurations. +``` +github.com/shaunrd0/klips/ +├── ansible # Ansible roles, playbooks, and examples +├── cpp # C++ programs, datastructures, and other examples +├── figlet # Figlet fonts I like :) +├── README.md +└── scripts # Bash scripts +``` diff --git a/ansible/README.md b/ansible/README.md index 15666d9..2a97e46 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -1,24 +1,12 @@ # Ansible -A few simple roles / plays I've been able to piece together in learning how to use Ansible. +A few simple roles / plays I've put together in learning how to use Ansible can be found under their corresponding directories. -Playbooks - - apt-up.yml - Playbook to update servers / groups ad hoc +Examples - core.yml - Playbook example for using core configuration role - docker.yml - Playbook example for using docker install role (Debian / Ubuntu) - hosts - Sample / partially default ansible hosts file - make-host.yml - Playbook example for using multiple roles together to create a new host - nginx.yml - Playbook example for using nginx role - fail2ban.yml - Playbook example for using fail2ban role - - postifx.yml - Playbook example for using postfix role - - bookstack-backup.yml - Playbook example for taking a backup of BookStack - - hexo-backup.yml - Playbook example for taking a backup of Hexo - - hexo-install.yml - Playbook example to install and deploy the Hexo site generator - -Roles - - core - Role to configure a new host with basic authentication / package settings - - docker - Role to install docker, docker-compose, configure docker user group (Debian / Ubuntu) - - nginx - Role to install and configure a new nginx webserver on a host - - fail2ban - Role to install and configure fail2ban on a new host - - postfix - Role to install and configure postfix on a new host - + - postfix.yml - Playbook example for using postfix role diff --git a/ansible/plays/README.md b/ansible/plays/README.md new file mode 100644 index 0000000..0882b07 --- /dev/null +++ b/ansible/plays/README.md @@ -0,0 +1,8 @@ +# Plays + +Playbooks + - apt-up.yml - Playbook to update servers / groups ad hoc + - bookstack-backup.yml - Playbook example for taking a backup of BookStack + - hexo-backup.yml - Playbook example for taking a backup of Hexo + - hexo-install.yml - Playbook example to install and deploy the Hexo site generator + diff --git a/ansible/roles/README.md b/ansible/roles/README.md index f60c053..68e9319 100644 --- a/ansible/roles/README.md +++ b/ansible/roles/README.md @@ -1,11 +1,13 @@ # Roles -Some simple Ansible roles created with `ansible-galaxy init --offline` command +Ansible roles created with `ansible-galaxy init --offline` command -klips/ansible/roles/... +Roles - core - Role to configure a new host with basic authentication / package settings - - docker - Role to install docker, docker-compose, configure docker user group + - docker - Role to install docker, docker-compose, configure docker user group (Debian / Ubuntu) + - fail2ban - Role to install and configure fail2ban on a new host - nginx - Role to install and configure a new nginx webserver on a host + - postfix - Role to install and configure postfix on a new host All of these roles assume you are using the apt package manager, and running a Debian / Ubuntu system. @@ -13,7 +15,7 @@ All of these roles assume you are using the apt package manager, and running a D core ------------ -A simple role for configuring a set of packages / settings on a new Ubuntu host using Ansible. +A role for configuring a set of packages / settings on a new Ubuntu host using Ansible. ### Packages Added / Configured @@ -33,19 +35,7 @@ Vim docker ------------ -A simple role for installing Docker and Docker Compose on a new Ubuntu host using Ansible. - - -nginx ------------- - -A simple role for installing and configuring nginx on a new Ubuntu host using Ansible. Supports templates for index.html and custom nginx.conf - - -postfix ------------- - -A simple role for installing and configuring the postfix MTA on a new Ubuntu host using Ansible. Supports templates for main.cf and custom sasl_passwd +Install and configure Docker and Docker Compose on a new Ubuntu host using Ansible. fail2ban @@ -54,3 +44,14 @@ fail2ban A simple role for installing and configuring fail2ban on a new Ubuntu host using Ansible. Supports templates for jail.local settings and provides a custom filter.d directory copy custom filters to the remote host. +nginx +------------ + +Install and configure nginx on a new Ubuntu host using Ansible. Supports templates for index.html and custom nginx.conf + + +postfix +------------ + +Install and configure the postfix MTA on a new Ubuntu host using Ansible. Supports templates for main.cf and custom sasl_passwd + diff --git a/cpp/README.md b/cpp/README.md new file mode 100644 index 0000000..1180142 --- /dev/null +++ b/cpp/README.md @@ -0,0 +1,25 @@ +# Cpp + +``` +shaunrd0/klips/cpp/ +├── cmake # Example of using cmake to build and organize larger projects +├── datastructs # Collection of useful datastructures written in C++ +├── opengl # Barebones opengl application written in C++ built with make +├── README.md +├── sdl # Barebones sdl application written in C++ built with make +└── sdl-cmake # Barebones sdl application written in C++ built with cmake +``` + + +In general, if a `CMakeLists.txt` is included in the project's root directory, +we can build the example with the following commands + +``` +mkdir build && cd build +cmake .. && cmake --build . +``` + + +If cmake is not being used in a project, it can be built with `g++` manually using +the commands outlined in `*/.vscode/tasts.json`, or by using VSCode to open the example +and running the build task. diff --git a/cpp/datastructs/README.md b/cpp/datastructs/README.md new file mode 100644 index 0000000..9391bf3 --- /dev/null +++ b/cpp/datastructs/README.md @@ -0,0 +1,20 @@ +# Datastructs + +A collection of useful datastructures written in C++. Examples of templating these +structures in C++ can be found in the `templates/` directory. + +``` +klips/cpp/datastructs +. +├── binarysearchtree # Binary search tree +├── circledoublelist # Circular doubly linked list +├── circlesinglelist # Circular singly linked list +├── doublelist # Doubly linked list +├── maxheap # Maximum heap +├── queuelist # Queue implementation using linked list +├── README.md +├── singlelist # Singly linked list +├── stacklist # Stack implementation using linked list +├── templates # Templated data structures +└── vector +``` diff --git a/cpp/datastructs/templates/README.md b/cpp/datastructs/templates/README.md new file mode 100644 index 0000000..4a7a264 --- /dev/null +++ b/cpp/datastructs/templates/README.md @@ -0,0 +1,14 @@ +# Datastructs + +A collection of templated datastructures written in C++ + +``` +klips/cpp/datastructs/templates/ +. +├── binarysearchtree # Templated binary search tree +├── doublelist # Templated doubly linked list +├── queuelist # Templated queue implementation using linked list +├── README.md +├── stacklist # Templated stack implementation using linked list +└── vector # Templated custom vector implementation +``` diff --git a/scripts/README.md b/scripts/README.md index 6bcece1..0b8fa26 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,5 +1,7 @@ -### scripts -adduser.sh - Script to add new user, run with sudo if you want to configure / allow user to sudo +# Scripts + +#### newuser.sh + - Script to add new user, run with sudo if you want to configure / allow user to sudo - `./adduser` - (Prints help text) - `./adduser ` - (Command doesn't need sudo if new user doesn't need sudo) - `sudo ./adduser ` @@ -7,3 +9,7 @@ adduser.sh - Script to add new user, run with sudo if you want to configure / al - Follow prompts to configure password / sudo depending on needs of new user - After the user is created, append them to any needed groups with `sudo usermod -aG groupname username` + +#### fix-vbox.sh + - Script to fix a common issue in vbox VMs + - Fix for issue where a portion of the VM screen is not clickable