I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 0 * * * /root/.acme.sh/acme.sh --renew --apache --renew-hook /root/.acme.sh/cloudkey-renew-hook.sh -d cloudkey.local.xintriq.net | |
* * */5 * * "/root/.acme.sh"/expirycheck.sh >> /var/log/letsencrypt.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
location /oauth2/ { | |
proxy_pass http://oauth-proxy:4180; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Scheme $scheme; | |
proxy_set_header X-Auth-Request-Redirect $request_uri; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Refer to the Caddy docs for more information: | |
# https://caddyserver.com/docs/caddyfile | |
:80 | |
reverse_proxy 10.100.100.1:80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# caddy.service | |
# | |
# For using Caddy with a config file. | |
# | |
# Make sure the ExecStart and ExecReload commands are correct | |
# for your installation. | |
# | |
# See https://caddyserver.com/docs/install for instructions. | |
# | |
# WARNING: This service does not use the --resume flag, so if you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS_ACCESS_KEY_ID= | |
AWS_SECRET_ACCESS_KEY= | |
AWS_HOSTED_ZONE_ID= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: http://www.chromium.org/developers/design-documents/network-stack/socks-proxy | |
To configure chrome to proxy traffic through the SOCKS v5 proxy server myproxy:8080, launch chrome with these two command-line flags: | |
--proxy-server="socks5://myproxy:8080" | |
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE myproxy" | |
The first thing to check when debugging is look at the Proxy tab on about:net-internals, and verify what the effective proxy settings are: | |
chrome://net-internals/#proxy |
This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.
Features:
- Automatically detect new containers and reconfigure nginx reverse-proxy
- Automatically generate/update SSL certificates for all specified containers.
- Watch for new docker images and update them.
- Ban bots and hackers who are trying to bruteforce your website or do anything suspicious.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function parseHttpHeaders(httpHeaders) { | |
return httpHeaders.split("\n") | |
.map(x=>x.split(/: */,2)) | |
.filter(x=>x[0]) | |
.reduce((ac, x)=>{ac[x[0]] = x[1];return ac;}, {}); | |
} | |
var req = new XMLHttpRequest(); | |
req.open('GET', document.location, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush cim -y --partial --source=modules/path/to/module/config/install/ |