General
Anything that are related to Linux but does not fit into the category of networking, storage, database or Desktop Environments
- Batch Image Resize
- Cheking Printer Ink Level
- Convert PNG to ICO using ImageMagick
- How to do Mac/iOS Stuff in Linux
- Sendmail Sample Usage
- Windows - Issues
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:
- Install libieee1284-devel
- Install libinklevel
- Install ink
- 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
- 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
- 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
- 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
<html><head><title>TESTING ONLY BAH</title></head>
<body>
<strong>Content line</strong> 1
<strong>Content line</strong> 2
<strong>Content line</strong> 3
</body></html>
* sendmail address@example.com < mail.txt
Windows - Issues
IIS Service Unavailable Error
- Search for "run"
- In the run dialog, enter "
iisreset
" and press run