/codedump

An unorganized reference dump for me.

codedump

Low Level Stuff

AI

Java

Spring Microservices

Distributed Systems

Blockchain

Software Architecture

DBMS

Concurrency

Networks

REST

Unorganized

  • Devhints Cheatsheets - Bash, MySQL, Go, etc.
  • Profiling React Components (Chrome)
  • How to Fix Your Git Branches After a Rebase
  • How To Serve Django Applications with uWSGI and Nginx on Ubuntu 16.04
  • Testing SMTP servers with swaks example
    swaks --to areebbeigh@gmail.com \
      --from noreply@example.com \
      --server email-smtp.ap-east-1.amazonaws.com:587 \
      --auth LOGIN \
      --auth-password <password> \
      --auth-user <user> \
      -tls
    
  • Rabbit MQ quick start
    docker run -p 15672:15672 -p 5672:5672 -d --hostname my-rabbit rabbitmq:3-management
    
  • Postman pre-request django csrf scipt
    pm.cookies.jar().get("localhost", "csrftoken", (error, val) => {
        console.log("upsert", val)
        console.log(pm.request.headers.upsert({
            key: "X-CSRFToken",
            value: val,
        }))
    })
  • Dir diff
    find "$Dir1/" "$Dir2/" -printf '%P\n' | sort | uniq -d
    find "$Dir1/" "$Dir2/" "$Dir2/" -printf '%P\n' | sort | uniq -u
    find "$Dir1/" "$Dir1/" "$Dir2/" -printf '%P\n' | sort | uniq -u
  • Print stack frames python
      if isinstance(exc_info, BaseException):
        exc_info = (type(exc_info), exc_info, exc_info.__traceback__)
      elif not isinstance(exc_info, tuple):
          exc_info = sys.exc_info()
      try:
          print(*traceback.format_stack(exc_info[1].__traceback__.tb_frame))
      except Exception:
          print("Could not print exception stack frames.", exc_info[1])
      traceback.print_exception(*exc_info)