Month: April 2022

PaySend Invite code: 0d8425

Do you look for PaySend Invite code? Ok, you got it!

Your PaySend Invite code is 0d8425.

PaySend Invite code 2022

You can use this Invite code in 2022, 2022 or later.

How to use a PaySend Invite code?

Dear customer, if you received a Invite code, you can use it to make a free-of-charge international transfer in Paysend. To do please, use the following instruction:

  • Log in to your account via paysend.com or through a mobile application;
  • Enter the destination and either amount "to send" or amount "to receive";
  • Tick the "Have a code?" box and select "Invite code";
  • Enter the Invite code in the field that appears at the bottom and click the "Add" button;
  • Your transfer fee is now reset to zero;
  • Follow the instructions of the application to complete the transfer;
  • You can track the use of your Invite code in your transaction history;
  • In case the transaction was unsuccessful you can re-use your Invite code later

*Invite code only applies to international transfers

PaySend user review

What happens if an IPv4 client tries to access an IPv6-only server (SOLVED)

Question:

Hey! The article says that IPv6 is a completely different protocol, I had a question. If my recipient's email works only on IPv6 (that is, his mail server listens only through the IPv6 protocol), does this mean that when sending a letter from a mail server that is connected only to IPv4, the letter simply will not reach the recipient, that is, I will have to choose some kind of mail service whose mail server works with both IPv6 and IPv4 so that my friend can read my letter?

Answer:

The considered situation, when one server has only an IPv4 address, and the second server has only an IPv6 address, is purely theoretical. ISPs that use IPv6 and provide IPv6 addresses to customers also provide IPv4 addresses at the same time.

For example, this router is connected to an ISP that supports IPv6. However, a router has two types of IP addresses:

  • 10.241.24.29
  • 2001:fb1:fc0:135:20e8:31d0:4821:6624

My computer is connected to this router, so it also has two types of IP addresses:

  • 192.168.1.58
  • 2001:fb1:139:20d8:82c0:cb25:b750:24d4

Note that IPv4 and IPv6 are such separate networks that for IPv6, the router has its own DNS server IP – 2001:fb0:100::207:49.

The same is true for hosting providers. For example, ISPs in my country do not support IPv6. But at the same time, hosting providers in my country have been supporting IPv6 for a very long time (for example, I set up IPv6 for SuIP.biz back in 2016, while one rented VPS server came with one free IPv4 and 3 free IPv6).

You can search for websites with IPv6 support and look at their DNS records – you will see that in addition to the AAAA record (IPv6 address of the site), there is also an A record for the site (IPv4 address of the site).

That is, yes, if one of the computers (client or server1) is connected only to an IPv4 network, and the second computer (server or server2) is connected only to an IPv6 network, then theoretically it is simply impossible to build a network route between them from the first to the second. But in practice, this problem does not arise simply for the reason that absolutely all clients and servers support IPv4, and some also support IPv6. That is, all possible combinations work according to one of the following options:

  • client and server support IPv6 – IPv6 is used
  • client supports IPv6 and server does not support IPv6 – IPv4 is used
  • client does not support IPv6 and server supports IPv6 – IPv4 is used
  • client does not support IPv6 and server does not support IPv6 – IPv4 is used

However, it is possible to isolate an IPv6-enabled server from an IPv4 network, which is what I talk about in the section “How to configure SSH to work with IPv6 only”.

In short: IPv4 and IPv6 are two different networks, even though they run on the same wires and on the same hardware.

If you're interested in a specific error, when you try to open an IPv6-only site from an IPv4-only client, you get the “Network is unreachable” error.

Another example of an error: if you try to run the following command from an IPv6-enabled network:

sudo nmap -6 suip.biz

then the host suip.biz will be scanned.

If you run the same command from a network without IPv6 support, an error will be displayed: “setup_target: failed to determine route to suip.biz (2a02:f680:1:1100::3d60)”.

See also detailed IPv6 guides:

Online services with IPv6 support:

How to edit the Access denied page in Squid? How to insert custom pictures and mail?

The custom Access denied page can only be shown if the user connects via HTTP. For HTTPS connections (which are currently the vast majority), it is impossible to change the displayed page (that is, display the configured Access denied page) due to the very nature of HTTPS, which is precisely designed to ensure that the transmitted data cannot be modified.

That is, you can edit the Access denied page in Squid, but it will only show up on the few occasions when an HTTP connection is made.

For HTTPS connections, a standard web browser page will be displayed with a message like “The proxy server is refusing connections”.

That is, it can be stated that the custom Access denied page in Squid will be used quite rarely and its setting can be attributed rather to outdated functionality.

Squid has page templates with various messages, including denied access, in various languages. For example: /usr/share/squid/errors/en/ERR_ACCESS_DENIED (“ERROR: The requested URL could not be retrieved”).

You can edit this page like a regular HTML file.

This page uses codes to insert into the template, for example:

  • %U
  • %c
  • %w
  • %W

The meaning of these codes, as well as many other codes, can be found on the following page: https://wiki.squid-cache.org/Features/CustomErrors

How to set Squid cache manager e-mail?

If you only want to specify the e-mail address of the Squid cache manager, then you do not need to edit the template files. You can use the following directives:

  • cache_mgr is email-address of local cache manager who will receive mail if the cache dies. The default is “webmaster”.
  • email_err_data – if enabled, information about the occurred error will be included in the mailto links of the ERR pages (if %W is set) so that the email body contains the data. Syntax is <A HREF="mailto:%w%W">%w</A>. It is already enabled by default, so no further configuration is required.

See also the complete guide: How to create and configure a Squid proxy server

What is the difference between “systemctl reboot” and “reboot” and “systemctl poweroff” and “poweroff”

What's the difference between

sudo systemctl reboot

And

sudo reboot

Is it true that the use of commands depends on the operating system, and that one will execute a shorthand version, the other will use systemctl?

Answer:

The halt, poweroff, reboot commands are implemented to maintain basic compatibility with the original SysV commands. Verbs

  • systemctl halt
  • systemctl poweroff
  • systemctl reboot

provide the same functionality with some additional features.

That is, reboot is now also systemctl. You can verify this:

which reboot
/usr/sbin/reboot

file /usr/sbin/reboot
/usr/sbin/reboot: symbolic link to /bin/systemctl

That is, the reboot command is actually a symbolic link to systemctl.

In turn, the command

systemctl reboot

is an abbreviation for

systemctl start reboot.target --job-mode=replace-irreversibly --no-block

That is

reboot

this is exactly the same as

systemctl reboot

as well as

systemctl start reboot.target --job-mode=replace-irreversibly --no-block

This is true for distributions that have switched to systemd (for example, Arch Linux, the entire Debian family, including Ubuntu). That is, for most modern distributions, except for those on which SysV remained.

In some cases, the reboot command does not work – see Error “Failed to talk to init daemon” for details. In this case, to restart the computer, you must add the -f option:

reboot -f

The shutdown command is:

poweroff -f

Even if these commands did not help, then use the options with the double option -f.

To turn off your computer do:

poweroff -f -f

Or restart your computer with the command:

reboot -f -f

The -f option means forced immediate stop, shutdown, or reboot. When specified once, this results in an immediate but clean shutdown by the system manager. If specified twice, it results in an immediate shutdown without contacting the system manager.

When using the -f option with systemctl halt, systemctl poweroff, systemctl reboot, or systemctl kexec, the selected operation is performed without shutting down all units. However, all processes will be forcibly terminated, and all file systems will be unmounted or remounted read-only. Therefore, it is a radical, but relatively safe option to request an immediate restart. If you specify --force twice for these operations (except for kexec), they will be executed immediately, without killing any processes or unmounting any filesystems. Warning: specifying --force twice for any of these operations can result in data loss. Note that if you specify --force twice, the selected operation is performed by systemctl itself and is not associated with the system manager. This means that the command must be executed even if the system manager fails.

How to convert JPG to PDF

The article “How to convert PDF to JPG using command line in Linux” shows how to split a PDF file into separate pages while converting them to images.

But what if you want to do the opposite? How to assemble JPG images into a PDF file? This article is devoted to this, which will tell you how to create a single PDF document from JPG files.

The convert utility from the ImageMagick package does a great job of combining images (JPG and other formats) into PDF.

On Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives, you can install this package with this command:

sudo apt install imagemagick

On Arch Linux, Manjaro and their derivatives, run the following commands to install:

sudo pacman -S imagemagick
# To support other formats such as JPEG (JPEG XL and JPEG2000), HEIF, DNG, SVG, WEBP, WMF, OpenRaster, OpenEXR, DJVU, install the following dependencies:
sudo pacman -S ghostscript libheif libjxl libraw librsvg libwebp libwmf libxml2 libzip ocl-icd openexr openexr openjpeg2 djvulibre pango

To convert a single image to PDF, run the following command:

convert PICTURE.jpg RESULT.pdf

Example:

convert PL48536179-5.jpg out.pdf

You can specify multiple input .jpg files at once, for example:

convert PL48536179-5.jpg PL48536179-6.jpg PL48536179-7.jpg out.pdf

They will be added one by one to the generated PDF file.

If there are many files and they have a common prefix, then you can use the wildcard character * to add several files at once:

convert PL48536179* out.pdf

Or like this:

convert PL*.jpg out.pdf

The following command will create a PDF file from all JPG files in the current directory:

convert *.jpg out.pdf

By default, a PDF file is created in the highest quality. If you want to reduce the size of the output file, then specify the -quality option with a value less than 100, for example:

convert -quality 70 PL*.jpg out2.pdf

As you can see, the size of the PDF file has indeed decreased:

Online JPG to PDF conversion service

If you are a Windows user, or you do not want to install new utilities and deal with the command line to convert JPG to PDF, then you can collect JPG files into one PDF document on the page of the Online service for converting JPG to PDF: https://suip.biz/?act=convert-jpg-to-pdf

Brief instructions for use are given there, the main point is that if there are several files, then they must be placed in a ZIP archive before uploading.

How to convert PDF to JPG using command line in Linux (SOLVED)

PDF files are not very easy to split into image files in most programs that are used to open these files. However, there are several command line utilities for this. This article will show you how to convert PDF to JPEG on the Linux command line.

ImageMagick (convert)

To convert PDF to individual image files, let's start with the ImageMagick utility.

On Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives, you can install this package with this command:

sudo apt install imagemagick

On Arch Linux, Manjaro and their derivatives, to install, run the command:

sudo pacman -S imagemagick
# To support other formats such as JPEG (JPEG XL and JPEG2000), HEIF, DNG, SVG, WEBP, WMF, OpenRaster, OpenEXR, DJVU, install the following dependencies:
sudo pacman -S ghostscript libheif libjxl libraw librsvg libwebp libwmf libxml2 libzip ocl-icd openexr openexr openjpeg2 djvulibre pango

Use convert like this:

convert input.pdf output.jpg

For good quality use these options

convert -density 300 -quality 100 in.pdf out.jpg

If you encounter errors, then the following articles may help you:

pdftoppm (from the poppler package)

On Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives, you can install this package with this command:

sudo apt install poppler-utils

On Arch Linux, Manjaro and their derivatives, to install, run the command:

sudo pacman -S poppler

The command format is the following:

pdftoppm -jpeg -r 300 input.pdf output

In this command:

  • -jpeg sets the output image format to JPG,
  • -r 300 sets output image resolution to 300 dpi,
  • output will be the prefix for all image pages that will be numbered and placed in your current directory you are working with.

However, in my opinion, the best way is to first use “mkdir -p images” to create the “images” directory, and then set the output to images/pg so that all output images with a pg file prefix in front of each of their numbers are neatly placed in just that created directory images.

So here are my favorite commands:

We create files with a size of ~1 MB per page. Output in .jpg format at 300 dpi:

mkdir -p images
pdftoppm -jpeg -r 300 mypdf.pdf images/pg

We create files with a size of ~2 MB per page. Output in .jpg format at maximum quality (least compression) and still at 300 dpi:

mkdir -p images
pdftoppm -jpeg -jpegopt quality=100 -r 300 mypdf.pdf images/pg

If you need more resolution, you can try 600 DPI:

mkdir -p images
pdftoppm -jpeg -r 600 mypdf.pdf images/pg

… or 1200 dpi:

mkdir -p images
pdftoppm -jpeg -r 1200 mypdf.pdf images/pg

To create a single file, run:

pdftoppm -singlefile -jpeg -r 300 input.pdf output

vips (from libvips package)

On Debian, Linux Mint, Ubuntu, Kali Linux and their derivatives, you can install this package with this command:

sudo apt install libvips-tools

On Arch Linux, Manjaro and their derivatives, to install, run the command:

sudo pacman -S libvips

libvips can quickly convert PDF → JPEG. This program is present in the standard repositories of most Linux distributions, for macos you can use homebrew, and the Windows binary can be downloaded from the libvips site.

This command will convert PDF to JPG with default resolution (72):

vips copy somefile.pdf somefile.jpg

You can use the dpi option to set a different rendering resolution, like so:

vips copy somefile.pdf[dpi=600] somefile.jpg

You can select specific pages:

vips copy somefile.pdf[dpi=600,page=12] somefile.jpg

Or render five pages, starting with the third, like this:

vips copy somefile.pdf[dpi=600,page=3,n=5] somefile.jpg

The documentation for pdfload has all the options.

Comparison of program speeds:

time -f %M:%e convert -density 300 r8.pdf[3] x.jpg
276220:2.17

time -f %M:%e pdftoppm -jpeg -r 300 -f 3 -l 3 r8.pdf x.jpg
91160:1.24

time -f %M:%e vips copy r8.pdf[page=3,dpi=300] x.jpg
149572:0.53

So libvips is about 4 times faster and requires half the memory, at least in this test.

Online service to convert PDF to JPG

If you are a Windows user, or you do not want to install new utilities and deal with the command line to convert PDF to JPG, then you can split PDF files into separate images on the page of the Online service for converting PDF to JPG: https://suip.biz/?act=convert-pdf-to-jpg

This online service supports both single-page and multi-page PDF files. In the case of converting a multi-page PDF document, the files with page pictures will be placed in an archive for convenience, which can be downloaded at a time, regardless of the number of JPG files.

See also: How to convert JPG to PDF

Loading...
X