baumi's blog

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

Know-How / Wissenswertes

Billings OSX sqlite3 cheat sheet

Usecase: import multiple entries into “Billings OSX”. We are using sqlite3 (as Billings OSX saves all its data into a Sqlite3 Database). This is just my very personal cheatsheet but anayone who’s interested might just use it for learning purposes. sqlite3 “/Users/user/Library/Application Support/Billings/Database/billings.bid” .table # OR: .tables .schema Invoice — .mode list .separator “, ” […]

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

Useful tools & commands for resizing/growing LVM based disks/filesystems …

gparted … https://www.gnu.org/software/parted/ https://gparted.org/download.php first boot into gparted, rightlick on the locked LVM areas and click “disable”. the lock disappears. then resize them to maximum, then open terminal: useful sample commands: (WARNING: DO *NOT* USE THESE COMMANDS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING! They are *NOT* thought to be copy/pasted, it’s just a […]

Previous Posts Next posts