Skip to content

Instantly share code, notes, and snippets.

@kakipo
kakipo / webapp.conf
Last active July 9, 2017 13:46
Force Redirect HTTP to HTTPS on nginx behind ELB
# redirect http to https
set $redirect "";
if ($http_x_forwarded_proto != 'https') {
set $redirect "1";
}
if ($http_user_agent !~* ELB-HealthChecker) {
set $redirect "${redirect}1";
}
if ($http_host ~ "your-nifty-domain.com") {
set $redirect "${redirect}1";
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

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!






\

Procedure for Mongodb Logrotate

The default install for Mongodb does not configure log rotation.

In /etc/logrotate.d/mongod

/var/log/mongodb/*.log {
    daily
    rotate 30
    compress

dateext