Run the following:
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment > /dev/null
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen > /dev/null
echo "LANG=en_US.UTF-8" | sudo tee /etc/locale.conf > /dev/null
sudo locale-gen en_US.UTF-8
| # list repos | |
| sudo apt-cache policy | |
| # add repo | |
| sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ saucy universe multiverse" | |
| # remove repo | |
| sudo add-apt-repository --remove <ppa:whatever/ppa> | |
| -- Accepted answer from here: https://stackoverflow.com/questions/5408156/how-to-drop-a-postgresql-database-if-there-are-active-connections-to-it | |
| SELECT pg_terminate_backend(pg_stat_activity.pid) | |
| FROM pg_stat_activity | |
| WHERE pg_stat_activity.datname = '[your database name goes here]' | |
| AND pid <> pg_backend_pid(); |
| If you don't have an E5 subscription, run 1709 in your environment, and use OSSEC, you can quickly add the new ASR features | |
| to your alerting and reports since you don't have access to the Defender console thingy. | |
| The event reference is here: https://docs.microsoft.com/en-us/windows/threat-protection/windows-defender-exploit-guard/event-views-exploit-guard#list-of-all-windows-defender-exploit-guard-events | |
| All your need to do is add: | |
| <localfile> | |
| <location>Microsoft-Windows-Windows Defender/Operational</location> | |
| <log_format>eventchannel</log_format> |
| # Source: https://stackoverflow.com/a/43317244 | |
| $path = ".\aws-ec2-key.pem" | |
| # Reset to remove explict permissions | |
| icacls.exe $path /reset | |
| # Give current user explicit read-permission | |
| icacls.exe $path /GRANT:R "$($env:USERNAME):(R)" | |
| # Disable inheritance and remove inherited permissions | |
| icacls.exe $path /inheritance:r |
| 0.0.0.0 host.youtube.com | |
| 0.0.0.0 mx.youtube.com | |
| 0.0.0.0 admin.youtube.com | |
| 0.0.0.0 devel.youtube.com | |
| 0.0.0.0 stats.youtube.com | |
| 0.0.0.0 http.youtube.com | |
| 0.0.0.0 mx0.youtube.com | |
| 0.0.0.0 administration.youtube.com | |
| 0.0.0.0 development.youtube.com | |
| 0.0.0.0 svn.youtube.com |
Run the following:
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment > /dev/null
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen > /dev/null
echo "LANG=en_US.UTF-8" | sudo tee /etc/locale.conf > /dev/null
sudo locale-gen en_US.UTF-8
| check host redis.host with address 127.0.0.1 | |
| if failed port 6379 protocol redis then alert | |
| check process redis-server with pidfile "/var/run/redis/redis-server.pid" | |
| start program = "/etc/init.d/redis-server start" | |
| stop program = "/etc/init.d/redis-server stop" | |
| if failed host 127.0.0.1 port 6379 then restart | |
| if 5 restarts within 5 cycles then timeout |
https://software.opensuse.org//download.html?project=home%3ACZ-NIC%3Aknot-resolver-latest&package=knot-resolver
| -- Refer to manual: https://knot-resolver.readthedocs.io/en/latest/daemon.html#configuration | |
| -- Listen on all interfaces (localhost would not work in Docker) | |
| net.listen('0.0.0.0') | |
| net.listen('0.0.0.0', 853, {tls=true}) | |
| -- Auto-maintain root TA | |
| trust_anchors.file = '/data/root.keys' | |
| -- Load Useful modules |
| events {} | |
| http { | |
| server { | |
| listen 8080; | |
| server_name a.com; | |
| location / { | |
| proxy_pass http://127.0.0.1:8888; | |
| } |