Archiv der Kategorie: IT

IT Stuff

Git Cheat Sheet

Mein Git Cheat Sheet

 

Befehle für und Parameter Git die ich mir nie so richtig merken kann

  • rebase
  • amend
  • Alle remote branches zum lokalen Repository transferieren
    hierfür brauchen wir ein kleines Script.

    for remote in `git branch -r`; do
    git branch --track ${remote#origin/} $remote;
    done

Docker Cheat Sheet

Mein Docker Cheat Sheet

Befehle und Parameter für Docker die ich häufiger brauche und mir nie ganz richtig merken kann

Alle container die nicht mehr laufen entfernen
docker rm $(docker ps -aq)

Alle images entfernen
docker rmi $(docker images -q)

To only stop exited containers and delete only non-tagged images
docker ps --filter 'status=Exited' -a | xargs docker stop docker images --filter "dangling=true" -q | xargs docker rmi

Container starten
docker run -name XXX imagename command

shell innerhalb des containers ausführen
docker exec -ti XXX bash

kostenlos Windows 10

Ein Trick:
Bei Heise Online gibt es einen Artikel zum Thema
http://www.heise.de/newsticker/meldung/Und-noch-ein-Trick-weiterhin-kostenlos-an-Windows-10-zu-kommen-3288425.html?wt_mc=rss.ho.beitrag.atom

PDF Dateien zusammenfügen

Die einfache Variante

pdfunite in-1.pdf in-2.pdf in-n.pdf out.pdf

mit Ghostscript:

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pd
gs         starts the Ghostscript program.
-dBATCH    once Ghostscript processes the PDF files, it should exit.
           If you don't include this option, Ghostscript will just keep running.
-dNOPAUSE  forces Ghostscript to process each page without pausing for user interaction.
-q         stops Ghostscript from displaying messages while it works
-sDEVICE=pdfwrite 
           tells Ghostscript to use its built-in PDF writer to process the files.
-sOutputFile=finished.pdf
           tells Ghostscript to save the combined PDF file with the specified name.

Mein neuer Favorit

pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf