Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.82 KB

2019-Mar.md

File metadata and controls

46 lines (38 loc) · 1.82 KB

March 2019

  1. Buildkit: https://github.com/moby/buildkit

    • Start server with docker
      docker run -d --privileged -p 1234:1234 moby/buildkit:latest --addr tcp://0.0.0.0:1234
      export BUILDKIT_HOST=tcp://0.0.0.0:1234
      sudo docker cp buildkit:/usr/bin/buildctl /usr/bin/buildctl
    • buildctl frontends:
      • dockerfile
      • gateway
    • buildctl exporter:
      • local
      • containerimage
      • oci
    • build multi platform image:
      • buildctl build --frontend dockerfile.v0 --frontend-opt platform=linux/${PLATFORM} --frontend-opt filename=./${DOCKERFILE_LOCATION} --exporter image --local dockerfile=. --local context=.
  2. Raspberry Pi starting process locations:

    • /etc/rc.local file which runs as script
    • crontab for cronjobs
    • systemd files in /lib/systemd/system
    • /etc/init.d/ directory of scripts
  3. Get used ports info: ss -tunapl (tags: network ports server)

  4. To make the process run in background do :

    • CTRL+z: Interrupt the process and push it in background
    • bg: Start interrupted process
    • jobs : to get a list of children jobs running in background
  5. Checkout a PR, test PR locally:

    • git fetch origin pull/{pr id}/head:{new branch}
  6. Remove a file from git which was previously committed but don't delete locally:

    • git rm --cached {file}
    • -r for a folder (example in case of vscode settings)
  7. Command line console app in rust: https://mattgathu.github.io/writing-cli-app-rust/

  8. Rmove a repository from ubuntu (apt-repository):

    • Check file /etc/apt/sources.list that may contain the repository
    • Check directory /etc/apt/sources.list.d/ that may contain a file pointing to the repository
  9. See windows used ports with "Resource monitor -> Network tab"

  10. Delete a git commit: git reset --hard HEAD~1