Skip to content

Shkodenko Taras

web development and system administration of Linux

  • PHP Mentorship Program
  • Privacy Policy
  • Security Consulting
  • About

Git: how to stash / unstash not commited changes

July 27, 2022 ~ tadmin

Git has a useful feature. You can stash not committed changes and then re-apply them. It helps you to restore the working directory and the index, to a clean working directory as it was before your not commited changes. To stash your changes run a command below: To apply (unstash) your changes run a command … Continue reading Git: how to stash / unstash not commited changes

Docker: copy file from host to container

June 24, 2022 ~ tadmin

To copy file from you host computer to a container use command docker cp Replace ${CONTAINER_ID} with ID of the container. You can get container name using command: Docker cp documentation.

Apache 2.4 virtual host config for a WordPress CMS

June 17, 2022June 17, 2022 ~ tadmin

Example of a virtual host for web server Apache version 2.4 config to run a development copy of WordPress CMS:

Composer show installed packages

Composer logo
May 21, 2022 ~ tadmin

To list installed composer libraries use command below:

PHP ?: ternary operator the Elvis operator

May 16, 2022May 16, 2022 ~ tadmin

You can use ?: ternary operator in PHP then you need not empty value. Set value to a $action variable from $_POST[‘action’] parameter if it is not empty or use string default instead. It is shown in the example code below: For more information see PHP documentation page for Ternary Operator. In PHP 5.3, a … Continue reading PHP ?: ternary operator the Elvis operator

mysqldump: Got error: 1045: “Access denied for user … (using password: YES)” when using LOCK TABLES

May 5, 2022May 5, 2022 ~ tadmin

Then I’ve developed MySQL backup script I’ve faced an error: which was fixed by adding parameter to mysqldump command. Also, if you dump InnoDB tables consider using the parameter. As it is described in MySQL 5.7 documentation page.

wp-cli update WordPress translations

April 23, 2022August 5, 2022 ~ tadmin

To update WordPress CMS core, plugin and theme translations the following commands can be used:

Install multiple php versions on Ubuntu server

April 17, 2022April 17, 2022 ~ tadmin

How to Install PHP 7.4 on Ubuntu. All packages should be installed as a root administrator user. Update Ubuntu Server Packages Before we install anything new on a server, you should update your server packages: # apt-get update && apt-get upgrade Install PHP 7.4 Next, to install PHP 7.4 on Ubuntu 20.04, just run the … Continue reading Install multiple php versions on Ubuntu server

Git create and apply patch files

March 28, 2022 ~ tadmin

To create a git patch file from the uncommitted changes in the current working directory use command: git diff > filename.patch In case some part of the work you’re doing are new files that are untracked and won’t be in your git diff output. So, one way to do a patch is to stage everything … Continue reading Git create and apply patch files

Git undo last commit

March 19, 2022March 19, 2022 ~ tadmin

To undo last commit in git you can use the following command below: $ git reset HEAD~

Posts navigation

Older posts
Newer posts

Support My Work!

Categories

  • Apache
  • CMS
  • Databases
  • Docker
  • Drupal
  • Git
  • Laravel
  • Lean
  • Linux
  • macOs
  • Magento
  • MySQL | MariaDB
  • Nginx
  • PHP
  • Pimcore CMS
  • Plesk
  • PostgreSQL
  • Server configuration
  • Symfony
  • Uncategorized
  • WordPress
  • Yii2
DigitalOcean Referral Badge

Tags

.htaccess Apache archive array bash certificate composer diff docker Drupal ffmpeg git git best practices grep IPTables Laravel Laravel best practices Laravel tips Linux Linux commands Linux file management MySQL mysqldump Odin openssl PHP PHP development Pimcore Plesk PostgreSQL ProFTPD script Security sed shell software development ssh ssl Symfony system administration tar ubuntu web development wordpress zip

Donations

You can support this project if you like what I'm writing

Recent Posts

  • How to Display a Configuration File Without Empty Lines and Comments in Linux
  • Happy 35-th Birthday, Linux: The Operating System That Changed the World
  • What does sed -n ‘BEGIN,ENDp’ /path/to/file.txt Linux shell command do?
  • PHP 31-th Anniversary — A Quick Look at the Evolution of the Language Code from Version 7.4 to 8.4
  • Gates vs Policies in Laravel: What’s the Difference and When Should You Use Each?
  • How to Create a tar+bzip2 Website Archive While Ignoring VCS Folders (.git and others)
  • 🐳 Basic Docker Workflow Using PHP + MySQL + Laravel

Search

  • GitHub
  • YouTube
  • Telegram
  • Patreon
  • Instagram
  • Pinterest
Support me on a Patreon ☕
Proudly powered by WordPress ~ Theme: Shcom-child by Taras Shkodenko.