AUTHOR: techlet

Story of yarn.lock

Should you be committing yarn.lock file?

Ans: Yes

In order to understand Yes, let’s dig down a bit on story of yarn.lock file

How Yarn maintains package consistency across machines?

It’s done in 2 ways

    1. Yarn created entire dependency tree using a deterministic algorithm before downloading packages from everchanging third party packages
    2. All the info related to dependency tree is maintained in yarn.lock file so that it can be shared between every system installing the dependencies.

… To be continued

S3 Bucket Copy from one bucket to another

We can copy content of one bucket to another by following:

1. AWS Console
– Login to AWS Console
– Go to
– Enter into source bucket
– select directory to be copied
– select “Copy” from “More” option
– select destination bucket
– select “Paste” option from “More” to destination directory. (Paste option can take some time to activate.)
Setup AWS Cli
sudo apt-get install awscli
aws configure
– Enter AccessKey
– Enter SecretKey
– Enter Out Format

Command to copy files:

s3 sync s3://sourcebucket/directory/ s3://destinationbucket/directory --exclude *.tmp

PPH Coding convention

Are you the person who has moved from JAVA to PHP and you are confused about PHP coding convention? Then this is place for you.

Following are the cases in which you define everything
1. PascalCase = ThisIsMyClass
2. camelCase = thisIsMyClass
3. lower_case = this_is_my_variable

NOTE: Difference between Pascal case and camelCase is first character of the word.

Drupal with composer – What to do and what not to do

Composer Manager allows custom/contributed modules to depend on PHP libraries managed via Composer.

Composer is a command line tool for installing PHP libraries and their dependencies on a per-project basis. These day, all libraries are registered on Packagist(You can define package dependencies here) and expect to be installed via Composer.

Use module to start using composer in your drupal 7 project.

Svn: E155037: Previous operation has not finished; run ‘cleanup’ if it was interrupted

svn: E155037: Previous operation has not finished; run ‘cleanup’ if it was interrupted

svn: E155017: Can’t install ‘<file path which got corrupted by svn>’ from pristine store, because no checksum is recorded for this file

How to install drush on ubuntu

Install drush through php pear