mercredi 17 novembre 2021

Slack/Zoom Team building : Scavenger hunt

 






Example list 


Organization :

* 1 master of masters : decides the list, and will count the points (in particular : who finished first ?)

* 1 master per group 

* split the list of attending people in zoom "breakout rooms" (1 per group)

* each group master is responsible for validating having seen the objects

* when done or at 15min => back to the main room and count

jeudi 11 novembre 2021

Indice de coût de la vie / cost of living

https://www.numbeo.com/cost-of-living/


 examples, in 2021-Nov (7,450,880 prices in 10,484 cities entered by 613,014 contributors)



  • Paris vs Montreal :

https://www.numbeo.com/cost-of-living/compare_cities.jsp?country1=France&country2=Canada&city1=Paris&city2=Montreal&tracking=getDispatchComparison

applications de gestion de déplacements


  • Chrono
  • Transit => great in Montreal
  • Google Maps => ok internationally
  • Apple plans => iOS specific, not tested
  • STL Synchro => Laval
  • Moovit => ?


  • Citymapper => great in Paris


mardi 9 novembre 2021

Online drawing tool (excalidraw)

 https://excalidraw.com/


(From presentation by  Alex Jones and Anaïs Urlichs [Civo] / Grafana ObservabilityCon 2021 )

https://grafana.com/go/observabilitycon/2021/loki-logging-at-scale-civo/


Linux cleaning tips (systemd, apt/ubuntu, docker)

 (evolutive article where I store what's been useful to me to clean space on linux servers I'm using)

Note : my current servers are running Ubuntu.



OS / SystemD : purge logs bigger than ...

Only keep 10M of each log files handle through syslog

sudo journalctl --vacuum-size 10M


OS / apt : remove remnants

Remove automatically all unused packages Remove automatically installed packages not needed anymore (i.e. packages that were installed as dependencies of packages that have now been removed or aren't requiring this dependency anymore)

apt options :

  •   autoremove - Remove automatically all unused packages
  •   clean - Erase downloaded archive files
  •   autoclean - Erase old downloaded archive files

sudo apt-get clean autoremove autoclean



Docker : remove logs older than ...

Only keep the last 1000h of docker containers logs

sudo docker image prune --all --filter "until=1000h" -f


Docker : remove remnants

Be careful ! If your docker environments are not running they might be deleted by some of the following commands !

Remove unused volumes, containers, images, networks, etc.

sudo docker system prune -f 

sudo docker system prune -a --volumes


jeudi 28 octobre 2021

kill processes from docker-compose "container_name"

Context : 

follwing a project-name change -> renaming the directory-name/docker-compose.yml the processes that were started by docker-compose were duplicated.

From the new project :

*  impossible to see them.

From docker ps : no process listed

From OS perspective ps aux : process present.


Test 1 : kill them all !

 Step 1 : identify them

ps aux | grep $(echo "$(grep container_name docker-compose.yml | grep -v '#' | awk '{printf("%s\\|", $2)}')grep")


Step 2 : kill -9 them all


ps aux | grep $(echo "$(grep container_name docker-compose.yml | grep -v '#' | awk '{printf("%s\\|", $2)}')grep") | awk '{print $2}' | xargs sudo kill -9


-> result : when restarting docker, they're back :-( 


Test 2 : stop docker + docker-compose start

apparently working, but I lost my container's content...


lundi 11 octobre 2021

Docker : thiner images

(from  GitLab Commit at KubeCon : One Layer Builds (Docker Not Included), by Jason Plum https://gitlab.com/WarheadsSE and Will Christensen)

* use FROM Scratch, instead of FROM <distro> 


 * Explore each layer of a docker image

https://github.com/wagoodman/dive 


* use Buildah : http://buildah.io/ "A tool that facilitates building OCI container images."

mercredi 6 octobre 2021

mardi 5 octobre 2021

Shell tools : shellcheck


  • ShellCheck, a static analysis tool for shell scripts

https://github.com/koalaman/shellcheck



suggests to add this on your makefiles :

check-scripts:
    # Fail if any of these files have warnings
    shellcheck myscripts/*.sh
or this on your CI (here : .travis.yml )
script:
  # Fail if any of these files have warnings
  - shellcheck myscripts/*.sh



mardi 28 septembre 2021

Code verifications / provers

C code + ACSL annotations --( Frama-C )--> "WhyML" Why3 format Proofs  --( Why3 analyser )--> proven code





  • ACSL By Example (good learning point with plenty of exmaples) Towards a Verified C Standard Library

https://www.mimuw.edu.pl/~alx/konstruowanie/ACSL-by-Example.pdf


  • Frama-C code analyser (Framework for Modular Analysis of C programs)

https://frama-c.com/
 https://frama-c.com/html/documentation.html 


https://frama-c.com/2016/11/22/Frama-C-and-ACSL-are-on-GitHub.html



  • Why3 / WhyML :

http://why3.lri.fr/

http://why3.lri.fr/doc/starting.html