fix: Add syntax highlighting to code blocks

This commit is contained in:
Asocia
2021-12-08 16:31:46 +03:00
parent 871f28d44c
commit 089e6ebae8
41 changed files with 92 additions and 87 deletions

View File

@ -1,6 +1,6 @@
I have lots of images of a scene from sunrise to sunset and my wallpaper is automaticatilly set to one of them based on the hour of the day. But you know what? I LOVE customizing my machine and I WANT MORE! I want the transition to be smooth af. To make this possible I need to generate images. And here is the result of literally 5 minutes of google search:
I have lots of images of a scene from sunrise to sunset and my wallpaper is automatically set to one of them based on the hour of the day. But you know what? I LOVE customizing my machine and I WANT MORE! I want the transition to be smooth af. To make this possible I need to generate images. And here is the result of literally 5 minutes of google search:
```
```bash
convert A.jpg B.jpg -morph 10 out.jpg
```

View File

@ -1,4 +1,4 @@
Most of the time, `xev` will be enough to know exactly which key is pressed but it generates a lot of output and sometimes that is overwhelming. If you find yourself in this situation try:
```
```bash
showkey -a
```

View File

@ -1,7 +1,8 @@
You can join multiple images into one using `convert`:
# join vertically
convert in1.png in2.png -append out.png
```bash
# join vertically
convert in1.png in2.png -append out.png
# join horizontally
convert in1.png in2.png +append out.png
# join horizontally
convert in1.png in2.png +append out.png
```

View File

@ -1,22 +1,26 @@
You can join multiple images to pdf using `convert`:
convert *.png out.pdf
```bash
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.
```
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
```bash
sudo vim /etc/ImageMagick-6/policy.xml
```
and replace the line
<policy domain="coder" rights="none" pattern="PDF" />
```xml
<policy domain="coder" rights="none" pattern="PDF" />
```
with
<policy domain="coder" rights="read|write" pattern="PDF" />
```xml
<policy domain="coder" rights="read|write" pattern="PDF" />
```
[source](https://askubuntu.com/questions/1081895/trouble-with-batch-conversion-of-png-to-pdf-using-convert)

View File

@ -1,6 +1,6 @@
You can join multiple pdf files into one using this command:
```
```bash
pdfunite in-1.pdf in-2.pdf in-n.pdf out.pdf
```

View File

@ -1,6 +1,6 @@
You can extract certain parts of a pdf file with this:
```
```bash
pdfjam original.pdf 5-10 -o out.pdf
```

View File

@ -1,4 +1,4 @@
You can use below command to create a virtual environment which contains installed packages:
```
```bash
virtualenv venv --system-site-packages
```