baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

June, 2016

Hardening WordPress, tshark decrypting SSL traffic

From a security point of view, WordPress seems to be a nightmare. The default setup exposes hundrets of .php include files in wp-includes/ and wp-content/ that may be directly called. And indeed, many robots out there are scanning the whole internet for these kind of files. Here are some ideas to improve security. Step 1: […]

Effectively storing multiple text files

Step 1: use 7z. The compression is far superior compared to other archivers, because the compression dictionary is reused between files. Compressing one file with 7z and compareing to e.g. gzip will show similar results. Compressing two similar files with 7z as opposed to gzip, will show dramatic differences in compression ratio between 7z and […]

Bash: trim left and right (leading and trailing whitespaces)

Wanted: remove leading and trailing whitespaces from variables or cat’d lines from a textfile. – Simple solution: echo ” a b c d ” | awk ‘{$1=$1};1’ prints: “a b c d” For convenience, i created /usr/bin/trim with this content: #!/bin/bash awk ‘{$1=$1};1’ which then allows echo ” a b c d ” | trim

Previous Posts