A common and reliable pattern in service unit files is thus:
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: dns-sync | |
| # Required-Start: | |
| # Required-Stop: | |
| # Default-Start: S | |
| # Default-Stop: | |
| # Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks | |
| ### END INIT INFO |
| # Redis Cheatsheet | |
| # All the commands you need to know | |
| redis-server /path/redis.conf # start redis with the related configuration file | |
| redis-cli # opens a redis prompt | |
| # Strings. |
| postgres: | |
| image: postgres:9.4 | |
| volumes: | |
| - ./init.sql:/docker-entrypoint-initdb.d/init.sql |
| # Want to run your Flask tests with CSRF protections turned on, to make sure | |
| # that CSRF works properly in production as well? Here's an excellent way | |
| # to do it! | |
| # First some imports. I'm assuming you're using Flask-WTF for CSRF protection. | |
| import flask | |
| from flask.testing import FlaskClient as BaseFlaskClient | |
| from flask_wtf.csrf import generate_csrf | |
| # Flask's assumptions about an incoming request don't quite match up with |
Picking the right architecture = Picking the right battles + Managing trade-offs
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
| # Fix user and directory permissions: | |
| find . -type f -print0 | sudo xargs -0 chmod 664 | |
| find . -type d -print0 | sudo xargs -0 chmod 775 | |
| # Copy user permissions to group permissions: | |
| chmod -R g=u . | |
| # Make new files inherit the group of the container directory | |
| chmod g+s <directory> |