Get image width and height
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 barborko-youtube.png
Web development tools
Here's a list of useful web development tools with a short description.
- Google tool for web page speed optimization:
more...
- Google tool for web page speed optimization:
Visual Studio Code
Visual Studio Code is so far the best free PHP editor that I've ever used.
This article will contain some personal reminders on customization, problem-solving, and shortcuts.
more...
This article will contain some personal reminders on customization, problem-solving, and shortcuts.
Google sheets formulas
Here are some useful formulas for Google sheets.
They may help you to automate some tasks.
more...
They may help you to automate some tasks.
Linux terminal search
This article is dedicated to search in Linux systems.
The examples will use "egrep" but they should also work with "grep" and "zgrep".
more...
The examples will use "egrep" but they should also work with "grep" and "zgrep".
Show git branch and path in the terminal
Show git branch and path in the terminal for Mac OS.
Add the following to ~/.zshrc or your equivalent.
more...
Add the following to ~/.zshrc or your equivalent.
Useful docker info
Copy a file from running docker container:
docker cp container_id:/path/to/your_file.txt /path/on/your/host
more...
docker cp container_id:/path/to/your_file.txt /path/on/your/host
Wordpress docker-compose.yml
Clean and simple Wordpress installation using docker-compose.yml.
more...
Supervisor settings and commands
Just basic supervisor settings commands and so on...
Installation:
more...
Installation:
Postman
Extracting data from responses and chaining requests:
https://blog.postman.com/extracting-data-from-responses-and-chaining-requests/
more...
https://blog.postman.com/extracting-data-from-responses-and-chaining-requests/
SSH and SCP examples
This page will store some useful and common SSH and SCP examples:
SSH using specific port:
more...
SSH using specific port:
Logrotate config
Here's a simple example for a logrotate config for laravel logs.
Keep in mind that the fact that the logs names contain %Y-%m-%d it doesn't mean that they contain
all or only records from the given date.
more...
Keep in mind that the fact that the logs names contain %Y-%m-%d it doesn't mean that they contain
all or only records from the given date.
PC install
The following list is just a reminder
for all useful tools and software needed
for PHP development environment.
more...
for all useful tools and software needed
for PHP development environment.
Useful excell/google sheets formulas
Sum all records except the first one in a column above the one that contains the formula:
=SUM(INDIRECT(ADDRESS(1;COLUMN())&":"&ADDRESS(ROW()-1;COLUMN())))
more...
=SUM(INDIRECT(ADDRESS(1;COLUMN())&":"&ADDRESS(ROW()-1;COLUMN())))
Commands to clear Docker
Here are a few easy ways to clear docker images and containers:
Stop all containers:
more...
Stop all containers:
Docker on Linux Mint 19
When attempting to install docker in Linux Mint 19 I had the following issue with the repository:
The repository 'https://download.docker.com/linux/debian tara Release' does not have a Release file.
more...
The repository 'https://download.docker.com/linux/debian tara Release' does not have a Release file.
Networking
This is a list of useful shell commands related to networking.
Keep in mind that most of the commands require sudo previleges.
Of course the commands could be edited to achieve results similar to the described ones.
more...
Keep in mind that most of the commands require sudo previleges.
Of course the commands could be edited to achieve results similar to the described ones.
Check certificates expiration date
A simple script to check the time left until SSL certificates expiration using opensll.
more...
Useful .htaccess rules
Here's a nice list of useful rules related to apache2 .htacces files:
more...
Allow user to edit /var/www
Allow another user to edit a directory in www-data group.
The post will be useful when editing files on your local /var/www/ directory.
more...
The post will be useful when editing files on your local /var/www/ directory.
Get system data
This article will contain commands that help to find information
about different aspects of a Linux based system.
more...
about different aspects of a Linux based system.
Logs and history tricks
The article will contain some useful tricks related to
Linux logs and history
more...
Linux logs and history
Lighttpd reload issue
Here's an interesting issue with Lighttpd server:
The command used to reload or restart the server should be in the same format as
more...
The command used to reload or restart the server should be in the same format as
Work with text files
The post describes basic tricks to deal with text files in Linux.
It's useful when you process large lists of records.
more...
It's useful when you process large lists of records.
Simple demon bash script
The goal of this script is to allow to run simple commands as demons.
Usage example to start a demon that will execute 'echo "Hello world" >> /tmp/demon.log' every 5 seconds :
more...
Usage example to start a demon that will execute 'echo "Hello world" >> /tmp/demon.log' every 5 seconds :
Interesting Linux SSH cases
Oh My ZSH:
A few days ago I've had a SSH connection issue to my PC after I uninstalled "Oh My ZSH".
more...
A few days ago I've had a SSH connection issue to my PC after I uninstalled "Oh My ZSH".
Apache 2 vhost config
This is an example for Apache server vhost configuration.
It demonstrates the following:
- Redirection to the HTTPs version.
more...
It demonstrates the following:
- Redirection to the HTTPs version.
Launch bash script using icon
Here's a way to set an icon that launches bash script in Debian systems.
In the given example the new icon will launch Android studio.
The location of the extracted archive in this case is /home/samuil/android-studio/bin/
more...
In the given example the new icon will launch Android studio.
The location of the extracted archive in this case is /home/samuil/android-studio/bin/
GIT hook for bare repo
This script creates a bare git repository and hook that does a
checkout of the pushed updates.
more...
checkout of the pushed updates.
Apache2 vhost on web server
This script makes the creation of virtual hosts on Apache2 web server quicker and easier.
The script is meant to be used for production web sites so it expects that
all of the traffic will use HTTPs.
more...
The script is meant to be used for production web sites so it expects that
all of the traffic will use HTTPs.
Server side web page screenshots
Here's a way to get screenshots of web pages on Debian system in a few simple steps.
Here's the info source:
more...
Here's the info source:
SublimeText3 useful info
The post is related to SublimeText3 text editor and contains useful information about settings, plugins and other features.
Some SublimeText3 tutorials
more...
Some SublimeText3 tutorials
Create MySQL table
This script creates a new table related to the next month.
It could be useful for projects that store the data from each month in a different table.
You could also modify it to execute any query.
more...
It could be useful for projects that store the data from each month in a different table.
You could also modify it to execute any query.
Automatic MySQL database backup
This simple script creates MySQL database backups and deletes the old ones. It's set to delete the backups older than 15 days but it could be set for more or less.
In the comments of the code is also an exaple with hours instead of days as an exparation time.
I use it as a cron service once a day but it could be used more or less often in case of need.
more...
In the comments of the code is also an exaple with hours instead of days as an exparation time.
I use it as a cron service once a day but it could be used more or less often in case of need.