Export or extract a certificate to or from PFX

Sometimes you have to deliver or you even get your server certificate files in the pfx file format (personal information exchange, see https://msdn.microsoft.com/en-us/library/windows/hardware/ff549703(v=vs.85).aspx), that is commonly used in Windows based environments. The following paragraphs show, how to export or extract a certificate to or from PFX. Export cert to PFX In order to export the Certificate, Private Key and any […]

Shrink PDF

For some applications it is necessary to keep the file size of an PDF under a certain limit. For example for  document uploads on some websites or to maintain the attachment file size limit of some email server.  You can use the following shell script to have a schrink command (Source: https://dev.to/manishfoodtechs/shrinking-file-size-of-pdf-using-a-small-bash-script-2pd1). Usage Webservice to shrink […]

Get your public IP via shell

To get your public IP you can use websites like www.whatismypublicip.com/ or just google for it (http://lmgtfy.com/?q=public+ip) But you can also get your public IP via the following Linux shell  command (the smart way :-D): $> curl ifconfig.me/all This gives you an output like that: ip_addr: 31.18.198.134 remote_host: ip123456.dynamic.kabel-deutschland.de user_agent: curl/7.35.0 port: 47745 lang: connection: keep_alive: encoding: […]

Rename to lower case

To rename all jpg-files in a folder to its lower cased equivalent, you can run this little shell script: $> for i in folderpath/*.jpg; do mv -v $i `echo $i | tr ‘[:upper:]’ ‘[:lower:]’`; done The -v param of mv will only give you a list of renamed files.