Lifesaving snippets

Some snippets that make my life easier.

I’m creating this post mostly for myself so I don’t have to remember all the specifics, if someone else finds it helpful – even better.

cUrl a SOAP service:

curl "" -H "SOAPAction: """"" --data-binary @post.txt --comcodessed -k -D responseHeaders.txt -v -o response.txt

(optional headers)

-H "Pragma: no-cache" -H "Accept-Encoding: gzip, deflate" -H "Content-Type: text/xml; charset=UTF-8" -H "Accept: application/xml, text/xml, */*; q=0.01" -H "Cache-Control: no-cache"


*nix / Mac

delete a folder with contents:

rm -rf [folder]

Create a “soft” symbolic link to a folder:

ln -s /path/to/original/ /path/to/link

Simple python based http server in the current folder:

python -m http.server 8000

The same as above with Python 2:

python -m SimpleHTTPServer 8000

OpenSSL encrypt / decrypt:

openssl des3 -in file.txt -out encrypted.txt
openssl des3 -d -in encrypted.txt -out normal.txt

File character garbage cleanup:

tr -cd '\11\12\15\40-\176' < 'original.csv' > 'cleaned.csv'

Start Apache

sudo apachectl start

Zip with password

zip -er *.*


jobs -l
kill 861
kill `jobs -p`

Switch to stopped task:

fg [%n]


curl like

Invoke-WebRequest -TimeoutSec 10

(New-Object System.Net.WebClient).DownloadString(“”)

create guid



(ls testFile.txt).LastWriteTime = Get-Date






as the first line of a csv file will automatically tell Excel to use that character as the separator instead of the default comma.

Bojan Bjelić
Working hard on bunch of stuff, positive future above all. I'm blogging mostly about software, productivity and digital world.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.