Bash Find and Delete Files Older Than X Days
find [FOLDER_NAME]/* -prune -mtime +14 -exec rm {} \;
find [FOLDER_NAME]/* -prune -mtime +14 -exec rm {} \;
Quick note: xinput map-to-output 11 eDP
I have a thinkpad laptop with a touchscreen. When I connect my external screen, then the touch sensor on my laptop screen moves the cursor on the external screen, which is not what I want. I want to keep my touch on my laptop screen.
I followed the instructions here: https://askubuntu.com/questions/51445/how-do-i-calibrate-a-touchscreen-…
First run:
xinput
Output:
To detach a process started in the terminal, you can always add & at the end. For example: npm run evaluation &
Or: nohup bash script.bash &
After that you can run "jobs", to see the running jobs for that user.
Otherwise you can use "htop" or "ps -ef |grep bash" to find all bash jobs for instance.
References:
https://www.dev2qa.com/how-to-run-node-js-server-in-background/
Many times you need to download files from the internet, specifically when you want to automate a process or two. Here is where wget comes in handy. This is a standard tool on most Linux systems.
In some cases the server you want to download from does a couple of checks, so your automation fails. You can come by that by adding a couple of switches like:
wget --user-agent="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" --auth-no-challenge URL_OF_FILE_TO_DOWNLOAD
SoapUI is a smart and advanced open source tool to test APIs.
Generate Sample XML using a WSDL in SOAP UI: https://www.youtube.com/watch?v=btS84mlJeNo
https://stackoverflow.com/questions/12222607/how-to-do-a-soap-wsdl-web-…
There are many tools and a lot of software out there to convert PDFs to Word.
Online tools like:
convertio.co
altoconvertpdftoword.com
readlink -e /proc/$(xprop -id $(xdotool getactivewindow) _NET_WM_PID | awk '{print $3}')/cwd
Inspired by: https://superuser.com/questions/1116636/open-a-terminal-from-any-direct…
curl tags: https://stackoverflow.com/questions/3074288/get-final-url-after-curl-is…
How to solve CloudFlare protection: https://stackoverflow.com/questions/18500088/curl-load-a-site-with-clou…
https://blog.joshlemon.com.au/protecting-your-pdf-files-and-metadata/
https://gist.github.com/hubgit/6078384
exiftool -all:all= $FILE ; qpdf --linearize $FILE output.pdf
imagemagick: mogrify -strip NAME_OF_FILE
Test with: exiftool -all NAME_OF_FILE
Written recommendations from Trafik og Veje, Aarhus Municipality (2011) and AgroTech (2010).