Outside Links collection

Sometimes you find just the right resources that fulfill certain need and nothing much should be added to them, in those cases I will just collect them on this page and add short comment why is this so.

Recursively renaming files and folders with PHP

I wanted to rename lots of filed and folders for my modules, but not to do it manually I made an php script that does this for me. Also I used my IDE to rename code(class names and methods). So just replace root where is the code you want to change file and folder names and do that for strings also.

Adding prefix or suffix to entity base fields

When creating custom entity you will use "BaseFieldDefinition" code snippets where you will define many things about this field, one of the things you may want to define is suffix or prefix that will be used in display of this field either on entity view or on views that use this field. To do that you will add it to setSettings array simple as 'suffix' => '%'

Having multiple drush versions on a enviroment

Do this on your local or virtual enviroment, depending where do you want to have it

mkdir ~/drush10
cd ~/drush10
composer require "drush/drush:10.*"

this will install drush10 to that directory and now you just need to add alias

SSH keys setup on Mac OsX

To add multiple ssh keys to your system, you need to edit config file ~/.ssh/config and put lines like below, this will also help store password for your ssh in keychain and use agent forwarding so you can use your keys on virtual machines like vagrant

Fastly and other CDN batch error

As Batch is dependent on the order of query string parameters if you are using Fastly or some other CDN they often have "Query String Sort" enabled or it is a good practice to do that, as it will result in more cache hits for you.

Flood and Block Ip while running tests (403)

There are 2 system in drupal 7 for IP blocking, one is flood blocking that is used on login and other is 
system_block_ip_action that is storing IP's in blocked_ips table and checking them while bootstrapping.

DrupalVM can't mount NFS or similar access problems on Mac OSX

This problem with access permissions has become common in latest versions of Mac OS, you need to give permissions to apps (executables) so they can do/use stuff on your disk/computer. Most of the times you will get a prompt for asking/checking this but sometimes this will quietly fail.