Install php7 on Debian 8 Jessie

Add repositories nano /etc/apt/sources.list deb http://packages.dotdeb.org jessie all deb-src http://packages.dotdeb.org jessie all Add key wget https://www.dotdeb.org/dotdeb.gpg && \ apt-key add dotdeb.gpg && \ apt-get update Install php apt instal...

Enable swap on Debian\Ubuntu in one line

fallocate -l 1G /swapfile && \ chmod 600 /swapfile && \ mkswap /swapfile && \ swapon /swapfile && \ swapon -s && \ cp /etc/fstab /etc/fstab.bak && \ echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab

Basic must have unix tools

Tools that i always install on clean unix system apt-get update && \ apt-get -y upgrade && \ apt-get install -y \ htop \ wget \ git \ ssh \ nano \ bash-completion \ telnet \ screen \ apt-transport-https \ ca-certificates \ curl \ rsync \ software-prop...

Install docker & docker-compose in one line

Fast install Docker cd /usr/local/src && wget -qO- https://get.docker.com/ | sh && \ curl -L "https://github.com/docker/compose/releases/download/1.18.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ chmod +x /usr/local/...

Using physical disk in VirtualBox

In Windows, open Disk Management. You'll see the associated drive numbers on the left and will identify them later as PhysicalDrive0, PhysicalDrive1, etc. cd C:\Program Files\Oracle\VirtualBox VBoxManage internalcommands createrawvmdk -filename C...

Composer

Fast install Composer curl -sS https://getcomposer.org/installer | php && \ mv composer.phar /usr/local/bin/composer && \ composer install

Examples how search UTF8 with BOM and not UTF8 files

Search php files in UTF8 with BOM encoding grep -rl --include=*.php $'\xEF\xBB\xBF' . Search NOT UTF8 php files find ./ -type f -iname "*.php" | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" > utf8_fail