Home - RamonPradoMoreno/learned-at-work GitHub Wiki

Welcome! :wave:

In this wiki you can find a bunch of tutorials and howtos that I use in my daily work.

Recent cool commands

Windows

  1. Check which application is running in a port:
    netstat -aon | findstr '[port_number]'
    # Copy PID and paste in the following command:
    tasklist | findstr '[PID]'
    

Linux

  1. top and htop work as a console task manager. Really powerful! 👍
  2. wc -l [file_name] counts the number of lines in a file.
  3. Retry a curl until there is connection (Pretty useful with docker containers):
    container_url='container:8080'
    while [ "$(curl -s -o /dev/null -w ''%{http_code}'' ${container_url})" != "200" ](/RamonPradoMoreno/learned-at-work/wiki/-"$(curl--s--o-/dev/null--w-''%{http_code}''-${container_url})"-!=-"200"-); do sleep 5; done
    printf "\n Container ${container_url} is ready: \n"
    

To think

“Talk is cheap. Show me the code.” Linus Torvalds

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction." E.F. Schumacher

"A good programmer is someone who always looks both ways before crossing a one-way street" Doug Linder

“Simplicity is prerequisite for reliability.” Edsger Dijkstra

“There are only two hard things in computer science: cache invalidation and naming things.” Phil Karlton

"In programming, as in everything else, to be in error is to be reborn." Alan Perlis