diff options
author | cbreton <corentin.breton@fullsave.com> | 2019-12-18 11:51:36 +0100 |
---|---|---|
committer | cbreton <corentin.breton@fullsave.com> | 2019-12-18 11:58:58 +0100 |
commit | ecc25dcecac342a7b39376ba969f1c5ea25a8aaa (patch) | |
tree | 0ecf1c44b61b08bd2ba35bd9a01e78953ed2bf96 | |
parent | 649f04f75130b85a2c8efd10b9edee41c26d3f46 (diff) | |
download | dotfiles-ecc25dcecac342a7b39376ba969f1c5ea25a8aaa.tar.xz dotfiles-ecc25dcecac342a7b39376ba969f1c5ea25a8aaa.zip |
Add more cheats
Diffstat (limited to '')
-rw-r--r-- | dotfiles/cheat/docker | 9 | ||||
-rw-r--r-- | dotfiles/cheat/pacman | 7 | ||||
-rw-r--r-- | dotfiles/cheat/python | 11 | ||||
-rw-r--r-- | dotfiles/cheat/qemu | 5 |
4 files changed, 31 insertions, 1 deletions
diff --git a/dotfiles/cheat/docker b/dotfiles/cheat/docker index 591eba4..86187f5 100644 --- a/dotfiles/cheat/docker +++ b/dotfiles/cheat/docker @@ -4,6 +4,12 @@ docker -d # start a container with an interactive shell docker run -ti <image_name> /bin/bash +# exemple run container with python:3 and delete all created files +docker run -it --rm python:3 bash + +# container with mounted volume in read-only +docker run -it -v "/source:/dest:ro" <image_name> bash + # "shell" into a running container (docker-1.3+) docker exec -ti <container_name> bash @@ -33,3 +39,6 @@ docker images IF: dpkg: error: error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link E: Sub-process /usr/bin/dpkg returned an error code (2) DO: echo N | sudo tee /sys/module/overlay/parameters/metacopy + +# command for launch GUI soft, sometimes custom Dockerfile is needed +--user $UID -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix <container_name> diff --git a/dotfiles/cheat/pacman b/dotfiles/cheat/pacman index 737bb64..6a00642 100644 --- a/dotfiles/cheat/pacman +++ b/dotfiles/cheat/pacman @@ -36,7 +36,6 @@ pacman -Qdt # overwrite package pacman --overwrite - # You can't directly install packages from the Arch User Database (AUR) with pacman. # You need yaourt to perform that. But considering yaourt itself is in the AUR, here is how to build a package from its tarball. # Installing a package from AUR is a relatively simple process: @@ -52,3 +51,9 @@ cd "$pkgname" makepkg -s # Install sudo pacman -U <package file (.pkg.tar.xz)> + +# Reinstall a package installed via pip with pacman +sudo pip uninstall --yes <package>; sudo pacman -S --noconfirm python-<package> + +# exemple via pikaur pkg +sudo pip uninstall --yes i3pystatus; pikaur -S i3pystatus-git --noconfirm diff --git a/dotfiles/cheat/python b/dotfiles/cheat/python index 865aa96..72506b0 100644 --- a/dotfiles/cheat/python +++ b/dotfiles/cheat/python @@ -65,3 +65,14 @@ pip install -e . # for install package in dev mode # virtualenv with custom python version mkvirtualenv projectpy2 --python=python2.7 + +# debug tool + +A powerful set of Python debugging tools, based on PySnooper: +https://github.com/alexmojaki/snoop + +Full-screen console debugger for Python +https://github.com/inducer/pudb + +pdb++, a drop-in replacement for pdb (the Python debugger) +https://github.com/pdbpp/pdbpp diff --git a/dotfiles/cheat/qemu b/dotfiles/cheat/qemu index f749c29..a59ef29 100644 --- a/dotfiles/cheat/qemu +++ b/dotfiles/cheat/qemu @@ -12,3 +12,8 @@ qemu-system-x86_64 -cdrom ~/Download/image.iso -boot order=d -drive file=/home/< tips: Get the mouse after grabbed by qemu: Ctrl+Alt+g +# sous le coude +# convertion d'une image du browser de crosoft pour des tests de siteweb par exemple avec un windows dedans + +qemu-img convert -O qcow2 MSEdge\ -\ Win10.vhdx msedge.qcow2 +qemu-system-x86_64 -m 4G msedge.qcow2 |