# Scripts for zsh Doc for my zsh scripts (`scripts.zsh`). ## System ### Update system `updatesys` Update: * Go binaries * Composer global install * Official Arch linux packages (via Aurman or yay if installed ; otherwise pacman) * AUR packages (via Aurman or yay if installed) ### Disk backup `dback ` Use dd to copy an entire hard disk to another disk output. Ask questions to be sure you know what you are doing :) Way safer than using pure dd without any warning message... ### Create ssh key `sshcreate ` Create a new ssh key at `~/.ssh/` with permission 700. The name will be put as comment in the key as well. ## Archives ### Extraction `extract ` Extract any archive automatically. Require `tar` and `unzip`. ### Compression `compress ` Compress a folder - output `tar.gz` ## Database ### Postgres These commands need `pv` to be installed. #### Dump `postgdump ` Create a dump of a database. Include clean up and create dabatase when imported back. The file created will be ``.sql `` and `` are not mandatory, default `postgres` and `localhost`. #### Import `postgimport ` Import a database. If the file is called `database.sql`, it will try to import into the database named `database`. `` and `` are not mandatory, default `postgres` and `localhost`. **THE OPERATION WILL OVERWRITE ALL DATA!** ## Network ### Ports `ports` List of port opens, fuzzy searchable via fzf ## Images ### Screenshot `screenshot ` Take a screenshot of the window / screen / area respectively. ### Image size `imgsize ` Display width / height of an image. ### Image resize `imgresize ` Resize and create a new image named `_.` following aspect ratio. `imgresizeall ` Resize every images with the same extension in the current folder `imgoptimize ` Optimize the image (conv -strip -interlace Plane -quality 85%) and create a new image `Imgoptimize ` Optimize the image (conv -strip -interlace Plane -quality 85%) and *replace* the image `imgoptimizeall ` Optimize the images with same extension in current folder(conv -strip -interlace Plane -quality 85%) and create new images `Imgoptimizeall *.` Optimize the images with same extension in current folder(conv -strip -interlace Plane -quality 85%) and *replace* them ### Image resize all `imgresize ` Resize every images with the extension `` in the current folder. Use Image resize (see above) ### Image convert to jpg `imgconvjpg ` Require imagemagick. Convert source to a jpg image ## Git `gtD ` Delete a tag locally AND on the remote. `` argument is not mandatory, default `origin`. `gtd ` Delete a tag ONLY on the remote. `` argument is not mandatory, default `origin`. ### FZF `fmux` Let you choose a tmuxp config ### FZF meets Git #### Checkout `fgco` Require fzf of course :) Checkout local or remote branch via FZF #### Logs `fgl` Simple way to fuzzy search in the log tree. ### Stash `fstash` Fuzzy search in the stash list. ## Other `thriftgen` Generate thrift config via thrift on local (docker image doesn't work...) `mkcd` Create a folder like `mkdir -p` and goes in it. `updatezsh` Update antibody plugins `promptspeed` Display the time for the prompt to appear when opening a new zsh instance ## Fun `matrix` Display... the matrix! `colorblocks` Display the main terminal colors configured, in nice blocks. [source](https://github.com/iiPlasma/dots/blob/master/bin/bin/colorblocks). `colorcards` Display all the terminal colors configured, in nice panes. [source](https://github.com/iiPlasma/dots/blob/master/bin/bin/colorcards). `pipes` Remember the OpenGL pipes screensaver on windows 9*? The same in the terminal. [source](https://github.com/iiPlasma/dots/blob/master/bin/bin/pipes).