Starting a new GitHub repository including having to merge
Wanting to create a new repository on GitHub, add in a few of the available options that can come with an initial repository such as:
Gradient tint over a background image
How to apply a gradient tint over a background image?
Set the background image
The first step is to set the background image. I wanted the image to cover the entire device, so scale aspect fill will be required.
self.backgroundImage = UIImageView(image: UIImage(named: "bgkMain")) self.backgroundImage.contentMode = .scaleAspectFill self.view.insertSubview(self.backgroundImage, at: 0)
How to log in to my CPanel server via SSH on OSX?
Copy directory
To copy the content of a directory /source to another existing directory /destination can be achieved with the command cp -a
cp -a source/. destination/
Changing the variables accordingly:
- source = challenge/vendor/
- destination = stg/vendor/
cp -a challenge/vendor/. stg/vendor/
General ssh update script for Drupal
First transfer the drupal-8.8.x.tar.gz file to your directory
Via your ssh program (for us Terminal on OSX), enter the path to the directory where you transferred the drupal-8.8.x file
Drupal update 8.7.x to 8.8.0
While the Drupal site has a great outline of the steps to follow, I found we needed to tweak so the update would work for us. I found the update process from 8.7.10 to 8.8.0 that worked on our sites was as follows
composer php version
Updating Drupal from 8.7.10 to 8.8.x or 8.9.x has seen a significant change as it has now moved into 9.x. It has integrated more with composer, and you can be caught by fatal errors occurring during the update process. One of these errors for me was the php version.
Terminal commands - find
Find by file name
To perform a find command in terminal use
find / -name php.ini -type f
find / -name {filename} {type parameters}Note there are many parameters in the commands, so I'll cover a couple regular expressions here. Such as,
vi(m) command mode
In Vim, following is an outline of the vi(m) functions you can utilise whilst in command mode - yes they are case sensitive
composer memory_limit
A recent attempt to run an update composer (regular activity for many of us), I had a memory limit issue. This was surprising because the memory setting via Plesk is set to 2G. Yet through Terminal it was showing only 128MB. What gives??
The error I was seeing: