Read a file line by line assigning the value to a variable
https://stackoverflow.com/questions/10929453/read-a-file-line-by-line-assigning-the-value-to-a-variable
Category: Uncategorized
UNIX / GNU find command
Find all directories within a path that contain files matching pattern:
find . -type f -iname *adf -printf "%h\n" | sort | uniq >/tmp/adf_dirs.txt
Above is using simple wildcard matching, it is also possible to use regex:
find . -regextype sed -iregex ".*/.*\.adf$" -printf "%h\n"|sort|uniq >/tmp/adf_dirs.txt
https://stackoverflow.com/questions/6844785/how-to-use-regex-with-find-command
FreeBSD 11 installation notes
Base install
Ports, first time
portsnap fetch
portsnap extract
Ports, updating
portsnap fetch
portsnap update
Checking installed packages against ports
Using portupgrade, (“pkg install portupgrade” first)
portversion -v
Updating, using ports binaries or source
portupgrade -vaP
Apache HTTPd
Default document root
/usr/local/www/apache24/data
Configuration location
/usr/local/etc/apache24/
MySQL
Configuration file: /usr/local/etc/mysql/my.cnf
Datadir: /var/db/mysql
Initial MySQL root password in $HOME/.mysql_secret
To change password for root
root@localhost [(none)]> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this
root@localhost [(none)]>
root@localhost [(none)]> alter user ‘root@localhost’ IDENTIFIED BY ‘new_password’;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
root@localhost [(none)]> set password = ‘new_password’;
Query OK, 0 rows affected (0.02 sec)
PHP
Configuration location
/usr/local/etc/
/usr/local/etc/php/
Prepare
pkg install png-1.6.29
pkg install jpeg
pkg install libxml2
pkg install libltdl
pkg install gmake
pkg install freetype2
pkg install curl
Install PHP and modules
pkg install php71
pkg install php71-imap
pkg install php71-mcrypt
pkg install php71-curl
pkg install php71-ctype
pkg install php71-dom
pkg install php71-fileinfo
pkg install php71-filter
pkg install php71-gd
pkg install php71-hash
pkg install php71-iconv
pkg install php71-json
pkg install php71-mysql
pkg install php71-mysqli
pkg install php71-openssl
pkg install php71-pcntl
pkg install php71-session
pkg install php71-simplexml
pkg install php71-tokenizer
pkg install php71-xml
pkg install php71-zlib
Install Apache module
pkg install mod_php71
ffmpeg
Creating video or audio clips using ffmpeg
ffmpeg clip audio interval with starting and end time
Cut part from video file from start position to end position with FFmpeg
Replacing audio in a video
Replacing video audio using ffmpeg
Create a single image video (for audio clips uploaded to Youtube)
Combine one image + one audio file to make one video using FFmpeg
Website analysis
Some tools for website analysis
PageSpeed Insights (Google)
Pingdom Website Speed Test
DareBoost (5 free tests/month)