Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -x
check(){
regex="^[a-z0-9!#\$%&'*+/=?^_\`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_\`{|}~-]+)*@([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]([a-z0-9-]*[a-z0-9])?\$"
checkaccounttokenproblem=$(tail -f /opt/zimbra/log/mailbox.log |grep --color -iE 'zimbraAuthTokens: no such value'|awk '{print $5}'|gawk -v RS='[[:alnum:]_.]+@[[:alnum:]_]+[.][[:alnum:]]+[.][[:alnum:]]+' 'RT{print RT}')
if [[ $checkaccounttokenproblem=~$regex ]] ; then
echo -e "\033[1;33m [+] Resetando token do usuario: \033[0m"; ${checkaccounttokenproblem}
server {
listen 80;
server_name hire.chris-hartwig.com;
location /.well-known {
alias /home/hire/.well-known/;
}
@vasanthk
vasanthk / System Design.md
Last active May 5, 2024 00:11
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?