Skip to main content

How to determine the size of a directory in Terminal

To determine the size of a directory using the terminal, you can use the du (disk usage) command. The syntax for this command can vary slightly depending on the operating system you are using, but a common way to use it is as follows:

 

Update a git feature branch to the latest branch (master)

In our projects, team members frequently generate new Git branches linked to the same Jira number, resulting in cluttered and disorganised structures that can pose challenges for both current and future developers. For instance:

Jira: ABC-123

Ticket work: Reformat headers

Over time, these branches accumulate and become disorganised, resulting in names like:

ABC-123-reformat-headers

ABC-123-format-headers

ABC-123-format-header

Using Twig {% extends %}

In Twig, the {% extends %} tag is used to inherit and extend the contents of another template. In the case you provided:

Managing VS Code extensions via terminal

Visual Studio Code (VS Code) allows you to manage extensions using the VS Code Command Line Interface (CLI) called code. With the code CLI, you can install, list, uninstall, and manage extensions from the command line.  

To check you have the code prompt running, run

code --version

Response you're looking for is

npm package management

A summary of Node package commands

Short cut commands

npm install <package>

npm i <package>

npm install --save <package>

npm i -S <package>

npm install --save-dev <package>

npm i -D <package>

npm install --global <package>

Could not get lock /var/lib/apt/lists/lock

Logging into the server, and there are packages to be updated.  You know the standard Ubuntu / Linux response

5 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

3 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

Followed by the action

Git changing local and remote branch name

Something I haven't had to do in a while is to change the name of a Git branch both local and remote.

 

Steps to renaming a branch

Rename your local branch:

If you are on the branch you want to rename:

git branch -m new-name

Whereas, if you're on a different branch:

How to resolve a cURL certificate 60 error - curl: (60) SSL certificate problem

Post a NetSkope update, composer would fail when running any command that required accessing an external package.  Actually initially all external traffic was being blocked.  The error was similar to

curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html

This error was also generated when running a basic command

Creating and applying a patch

I need to generate a patch and then apply automatically to my Drupal installation.

Current path to the file: web/core/modules/views/src/Plugin/views/argument/

Orignal filename: ArgumentPluginBase.php

Adjusted filename: ArgumentPluginBase-adjusted.php

 

Create a Patch

A patch is used to create or override changes in another file.  The command to create a patch is:

Subscribe to 2.x