PHP | disk_free_space( ) Function

The disk_free_space() function in PHP is an inbuilt function which is used to return the amount of free space in a specified directory. The disk_free_space() function denotes the free space in bytes.

It returns the available space on a filesystem or on a disk partition. The disk_free_space() function returns the number of bytes available on the corresponding filesystem or disk partition for a specified directory inputted as a string.

[mai mult...]

PHP | disk_total_space( ) Function

The disk_total_space() function in PHP is an inbuilt function which is used to return the total space of a specified directory. The disk_total_space() function denotes the total space in bytes. It returns the total space on a filesystem or on a disk partition.

The disk_total_space() function returns the total number of bytes on the corresponding filesystem or disk partition for a specified directory inputted as a string.

[mai mult...]

PHP | fflush( ) Function

The fflush() function in PHP is an inbuilt function which is used to write all the buffered output to an open file. The fflush() function forces a write of all buffered output to the resource pointed to by the file handle. The fflush() function returns true on success and false on failure.

[mai mult...]

AutoFit in Excel

Excel’s AutoFit is used to automatically resize cells in a worksheet to accommodate different sized data and avoid manually changing the column width and row height. We can set column width and row height manually as per our requirement by clicking on column width or row height in the Format option in the cells group on the Home tab.

[mai mult...]

Send and receive Gmail from the Linux command line

Because it’s relatively rare to run your own email server today, and because Gmail is very common, this tutorial assumes you’re using Mutt with Gmail. If you’re concerned about email privacy, consider opening an account with ProtonMail or Tutanota, both of which provide fully encrypted email.Tutanota has many open source components, and ProtonMail provides an IMAP bridge for paid users so that you don’t have to work around accessing your email outside a browser. However, many companies, schools, and organizations don’t run their own email services and just use Gmail, so you may have a Gmail account whether you want one or not.

[mai mult...]

Shrink PDF size with this command line trick

Simple Scan has two resolution settings, Images and Text, and saves files as PDFs. Unfortunately, the quality of the scans—the words, numbers, and graphics—is unsuitable using the Text setting, but the files are quite large—up to 5MB for just a few pages—using the Image setting. I found an answer to the latter problem using the commands pdf2ps and ps2pdf, which are part of the Ghostscript package. This solution shrinks the size of PDF files, making them easier to share via email.

The man pages for these commands are terse, and it was challenging to find good documentation for them and their settings. So I pieced together the following by combining information from the man pages with various other bits of advice I found on the internet.

[mai mult...]

Edit PDFs on the Linux command line

Many of the documents you receive come in PDF format. Sometimes those PDFs need to be manipulated. For example, pages might need to be removed or added, or you might need to sign or change a specific page.

There are some fancy graphical user interface tools that let you edit PDFs, but I have always been most comfortable with the command line. Of the many command-line tools for this task, the ones I use when I want to modify a PDF are qpdf and poppler-utils.

[mai mult...]