# General Anything that are related to Linux but does not fit into the category of networking, storage, database or Desktop Environments # Batch Image Resize ## Keeping Aspect Ratio ``` mogrify -path [Full path to store the resized images] -resize [width]x[height] -quality [quality] -format [format] *.JPG ``` ## No Aspect Ratio ``` mogrify -path [Full path to store the resized images] -resize [width]x[height]! -quality [quality] -format [format] *.JPG ``` # Cheking Printer Ink Level It can be frustrating sometimes that Linux users aren't able to check the ink levels on our printers like Windows users could, but luckily there are packages that will resolve this problem for major printer manufacturers: 1. Install [libieee1284-devel](https://github.com/twaugh/libieee1284 "libieee1284-devel") 2. Install [libinklevel](http://libinklevel.sourceforge.net/ "libinklevel") 3. Install [ink](http://ink.sourceforge.net/ "ink") 4. Use command `ink -p usb` to check # Convert PNG to ICO using ImageMagick ``` convert logo.png -define icon:auto-resize=64,48,32,16 logo.ico ``` # How to do Mac/iOS Stuff in Linux ### Converting Apple Developer Certificate to .p12 with OpenSSL 1. Convert the developer certificate file you receive from Apple into a PEM certificate file. Run the following command-line statement from the OpenSSL bin directory: `openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM` 2. If you are using the private key from the keychain on a Mac computer, convert it into a PEM key: `openssl pkcs12 -nocerts -in mykey.p12 -out mykey.pem` 3. You can now generate a valid P12 file, based on the key and the PEM version of the iPhone developer certificate: `openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12` # Sendmail Sample Usage mail.txt: ``` MIME-Version: 1.0

Content-Type: text/html

From: newsletter@shopbah.com

Subject: TESTING 123 hehehe



TESTING ONLY BAH



Content line 1

Content line 2

Content line 3

  ``` \* `sendmail address@example.com < mail.txt` # Windows - Issues ## IIS Service Unavailable Error 1. Search for "run" 2. In the run dialog, enter "`iisreset`" and press run