mirror of
https://github.com/sahinakkaya/til.git
synced 2025-07-17 14:01:49 +03:00
fix: Add syntax highlighting to code blocks
This commit is contained in:
@ -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
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
You can extract certain parts of a pdf file with this:
|
||||
|
||||
```
|
||||
```bash
|
||||
pdfjam original.pdf 5-10 -o out.pdf
|
||||
```
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
You can use below command to create a virtual environment which contains installed packages:
|
||||
```
|
||||
```bash
|
||||
virtualenv venv --system-site-packages
|
||||
```
|
||||
|
Reference in New Issue
Block a user