Update READMEs

This commit is contained in:
Shaun Reed 2020-11-23 14:45:00 -05:00
parent b9843a5d99
commit e4ccaf4bd9
8 changed files with 105 additions and 35 deletions

View File

@ -1,4 +1,12 @@
# klips # 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
```

View File

@ -1,24 +1,12 @@
# Ansible # 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 Examples
- apt-up.yml - Playbook to update servers / groups ad hoc
- core.yml - Playbook example for using core configuration role - core.yml - Playbook example for using core configuration role
- docker.yml - Playbook example for using docker install role (Debian / Ubuntu) - docker.yml - Playbook example for using docker install role (Debian / Ubuntu)
- hosts - Sample / partially default ansible hosts file - hosts - Sample / partially default ansible hosts file
- make-host.yml - Playbook example for using multiple roles together to create a new host - make-host.yml - Playbook example for using multiple roles together to create a new host
- nginx.yml - Playbook example for using nginx role - nginx.yml - Playbook example for using nginx role
- fail2ban.yml - Playbook example for using fail2ban role - fail2ban.yml - Playbook example for using fail2ban role
- postifx.yml - Playbook example for using postfix role - postfix.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

8
ansible/plays/README.md Normal file
View File

@ -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

View File

@ -1,11 +1,13 @@
# Roles # Roles
Some simple Ansible roles created with `ansible-galaxy init <role> --offline` command Ansible roles created with `ansible-galaxy init <role> --offline` command
klips/ansible/roles/... Roles
- core - Role to configure a new host with basic authentication / package settings - 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 - 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. 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 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 ### Packages Added / Configured
@ -33,19 +35,7 @@ Vim
docker docker
------------ ------------
A simple role for installing Docker and Docker Compose on a new Ubuntu host using Ansible. Install and configure 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
fail2ban 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. 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

25
cpp/README.md Normal file
View File

@ -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.

20
cpp/datastructs/README.md Normal file
View File

@ -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
```

View File

@ -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
```

View File

@ -1,5 +1,7 @@
### scripts # Scripts
adduser.sh - Script to add new user, run with sudo if you want to configure / allow user to sudo
#### newuser.sh
- Script to add new user, run with sudo if you want to configure / allow user to sudo
- `./adduser` - (Prints help text) - `./adduser` - (Prints help text)
- `./adduser <name> <userID>` - (Command doesn't need sudo if new user doesn't need sudo) - `./adduser <name> <userID>` - (Command doesn't need sudo if new user doesn't need sudo)
- `sudo ./adduser <name> <userID>` - `sudo ./adduser <name> <userID>`
@ -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 - 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` - 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