Convert linefeeds for all files in a folder (CRLF to LF)

If you are working in teams using different operating systems, it could happen, that you get files with unsuitable linefeeds in it. For me as a Linux user the bad guys are normally CRLF’s (Carriage Return and Line Feed @see https://en.wikipedia.org/wiki/Newline). To just convert the CRLF’s in a single file to LF you can use the […]

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 […]

Lock shellscript process under Unix based systems

Today I ran again into a common problem when dealing with cron based scipts that run concurrently. That’s why I had to lock shellscript process until it is finished before starting the next executing round. On Unix based systems like Linux you can achieve that with flock. flock binds a file descriptor to a certain lock […]

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: […]

Run a DynDNS client under Raspbian

For a home automation project I have to setup a local DynDNS client on my Banana Pi running with Raspian. Here are the steps I’ve taken to run a DynDNS client under Raspbian (will work on other Debian based Linux distributions too): Install ddclient package: $>sudo apt-get install ddclient This command installs the package and starts the DynDNS […]

Xubuntu – Fix black screen after wakeup from suspend mode

On Xubuntu 14.04.3 LTS I got a black screen after wakeup the machine from suspend mode. This didn’t happen all the time. It was more of a sporadic phenomenon happening after entering the credentials to unlock the machine. Under these circumstances the screen got black and the machine didn’t react on any actions any more. I could got to […]