PHP HowTo – correctly search for a string inside a string
22.Sep.2022

the developer can name this file ./EXAMPLES/ARRAY/find.php please note the strpos or stripos !== false without it, if a substring is found within a string at position 0 for if 0 equals false <?php $mystring = ‘abc’; $findme = ‘a’; […]

PHP HowTo – sort array of arrays
22.Sep.2022

usage: $devices_array_sorted = ArrayOfArraysSort($devices_array, “AverageWatts”,SORT_ASC); the function: /* sort array that contains a lot of arrays by key */ function ArrayOfArraysSort($array,$key,$mode) { // sort by age $sort = array(); foreach($array as $k=>$v) { $sort[$key][$k] = $v[$key]; } # sort by […]

GNU Linux – fonts and font editors – what is WOFF?
26.Aug.2022

TTF vs WOFF (Web Open Font Format) “TTF (TrueType Font) is a standard developed by Apple in the 1990s” “WOFF is basically a compressed TTF with metadata and browser support” (src) developed by Mozilla in concert with Type Supply, LettError, […]

19.Aug.2022

How to create an encrypted USB stick Creating an encrypted USB stick under GNU/Linux is fairly ease. First lets install required packages and erase everything from the stick export USB_STICK=”/dev/sdb” apt-get install parted cryptsetup-bin shred -n 10 -v -z “${USB_STICK}” […]

GNU Linux bash – optimizing basics – the ll alias to ll
26.Jul.2022

ok an alias is simply an appreviation (ll) of a longer command (ls -lah –color) defined in one of those files: user@Debian8:~$ bash -l; # simulates a login 1. hello from /etc/bash.bashrc 2. hello from /etc/profile 7. hello from ~/.bash_profile […]

MySQL MariaDB cheat sheet
14.Jul.2022

login to mysql: su – root; list all available databases: # login & send command to mysql & logout mysql -u root -e ‘show databases’ -s –skip-column-names # or login mysql -u root -p; # enter command mysql> show databases; […]

GNU Linux Debian 11 – How to setup Brother QL 600 LabelPrinter
13.Jul.2022

it’s a two part process: 1. install the drivers (thanks all involved great work 🙂 su – root apt update apt install printer-driver-ptouch 2. install the printer via cups web browser interface http://localhost:631/ or: https://localhost:631/ -> Administration -> Add Printer […]