mirror of
https://github.com/sahinakkaya/til.git
synced 2025-07-17 14:01:49 +03:00
Rename a dir
This commit is contained in:
1
command-line-utils/gotchas.md
Normal file
1
command-line-utils/gotchas.md
Normal file
@ -0,0 +1 @@
|
||||
If you are working in command line and want to assign some keybinding to something, be careful if you want to use `<C-m>` (a.k.a `<Ctrl-m>`). This is **same** as sending `<Enter>` to the terminal which might not be what you want.
|
7
command-line-utils/joining-images-into-one.md
Normal file
7
command-line-utils/joining-images-into-one.md
Normal file
@ -0,0 +1,7 @@
|
||||
You can join multiple images into one using `convert`:
|
||||
|
||||
# join vertically
|
||||
convert in1.png in2.png -append out.png
|
||||
|
||||
# join horizontally
|
||||
convert in1.png in2.png +append out.png
|
22
command-line-utils/joining-images-to-pdf.md
Normal file
22
command-line-utils/joining-images-to-pdf.md
Normal file
@ -0,0 +1,22 @@
|
||||
You can join multiple images to pdf using `convert`:
|
||||
|
||||
convert *.png out.pdf
|
||||
|
||||
If you get an error like
|
||||
|
||||
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.
|
||||
|
||||
follow the steps below:
|
||||
|
||||
sudo vim /etc/ImageMagick-6/policy.xml
|
||||
|
||||
and replace the line
|
||||
|
||||
<policy domain="coder" rights="none" pattern="PDF" />
|
||||
|
||||
with
|
||||
|
||||
<policy domain="coder" rights="read|write" pattern="PDF" />
|
||||
|
||||
|
||||
[source](https://askubuntu.com/questions/1081895/trouble-with-batch-conversion-of-png-to-pdf-using-convert)
|
7
command-line-utils/joining-pdf-files.md
Normal file
7
command-line-utils/joining-pdf-files.md
Normal file
@ -0,0 +1,7 @@
|
||||
You can join multiple pdf files into one using this command:
|
||||
|
||||
```
|
||||
pdfunite in-1.pdf in-2.pdf in-n.pdf out.pdf
|
||||
```
|
||||
|
||||
Make sure to provide output file name otherwise last input file will be overwritten.
|
7
command-line-utils/splitting-pdf-files.md
Normal file
7
command-line-utils/splitting-pdf-files.md
Normal file
@ -0,0 +1,7 @@
|
||||
You can extract certain parts of a pdf file with this:
|
||||
|
||||
```
|
||||
pdfjam original.pdf 5-10 -o out.pdf
|
||||
```
|
||||
|
||||
If `pdfjam` is not installed, you can try doing it with GUI. Search for "Print to file" option.
|
@ -0,0 +1,4 @@
|
||||
You can use below command to create a virtual environment which contains installed packages:
|
||||
```
|
||||
virtualenv venv --system-site-packages
|
||||
```
|
Reference in New Issue
Block a user