Posts

Showing posts from 2024

Create a branch in bitbucket cloud using curl

 Example: curl -X POST \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -d '{       "name": "feature/mynewbranch",       "target": {           "hash": "master"       }     }' \ "https://api.bitbucket.org/2.0/repositories/gopiworkspace/gopirepo/refs/branches" <access_token> is generated in the repository where you want to create the branch. https://bitbucket.org/gopiworkspace/gopirepo/admin/access-tokens  Ref: https://community.atlassian.com/t5/Bitbucket-discussions/Create-branch-BitBucket-REST-API-Support/td-p/610927 

Debugging

 devel_kint_extras disable minifyhtml module to take any kind of devel modules take effect.

ClamAV in MAC

Install ClamAV in MAC  > b rew install clamav  >  cp /usr/local/etc/clamav/clamd.conf.sample usr/local/etc/clamav/clamd.conf Uncomment  below TCPSocket 3310 TCPAddr localhost > cp /usr/local/etc/clamav/clamd.conf.sample/ freshclam.conf.sample  /usr/local/etc/clamav/ freshclam.conf .conf Comment below Example > brew services restart clamav   Starting and Verifying ClamAV Start clamd : Start the ClamAV daemon manually to ensure it’s running: sudo clamd Check Status : Verify that clamd is running and listening on the correct port: sudo lsof -i -P -n | grep clamd Start freshclam : Start the FreshClam updater to update the virus definitions: sudo freshclam

Semmai

  ą®šąÆ€ą®°ą®• ą®ØąÆ€ą®°ą®æą®²ąÆ ą®šą®æą®¤ąÆą®¤ą®°ą®¤ąÆą®¤ąÆˆ: ஒரு பானை ą®ØąÆ€ą®°ą®æą®©ąÆˆ ą®Øą®©ąÆą®±ą®¾ą®•ą®•ąÆ ą®•ąÆŠą®¤ąÆą®¤ą®æą®•ąÆą®• ą®µą®æą®ŸąÆą®ŸąÆ, சிறு ą®¤ąÆ‡ą®•ąÆą®•ą®°ą®£ąÆą®Ÿą®æ அளவு ą®šąÆ€ą®°ą®•ą®®ąÆ, ą®Žą®ŸąÆą®ŸąÆ ą®®ą®æą®³ą®•ąÆą®•ą®³ąÆ, சிறிதளவு ą®šą®æą®¤ąÆą®¤ą®°ą®¤ąÆą®¤ąÆˆ ą®†ą®•ą®æą®Æą®µą®±ąÆą®±ąÆˆą®ŖąÆ ą®ŖąÆ‹ą®ŸąÆą®ŸąÆ ą®®ąÆ‚ą®Ÿą®æą®µą®æą®Ÿ ą®µąÆ‡ą®£ąÆą®ŸąÆą®®ąÆ. இரவு ą®‡ą®µąÆą®µą®¾ą®±ąÆ ą®šąÆ†ą®ÆąÆą®¤ąÆą®µą®æą®ŸąÆą®™ąÆą®•ą®³ąÆ. ą®®ą®±ąÆą®Øą®¾ą®³ąÆ ą®•ą®¾ą®²ąÆˆ ą®®ąÆą®¤ą®²ąÆ ą®‡ą®ØąÆą®ØąÆ€ą®°ąÆˆą®•ąÆ ą®•ąÆą®Ÿą®æą®ØąÆ€ą®°ą®¾ą®•ą®ŖąÆ ą®Ŗą®°ąÆą®•ą®²ą®¾ą®®ąÆ. ą®†ą®±ą®æą®ŖąÆą®ŖąÆ‹ą®©ą®¾ą®²ąÆą®®ąÆ ą®šąÆ‚ą®ŸąÆ‡ą®±ąÆą®±ą®¤ąÆ ą®¤ąÆ‡ą®µąÆˆą®Æą®æą®²ąÆą®²ąÆˆ. ą®šąÆ€ą®°ą®•ą®®ąÆ, மிளகு, ą®šą®æą®¤ąÆą®¤ą®°ą®¤ąÆą®¤ąÆˆ ą®†ą®•ą®æą®Æą®µą®±ąÆą®±ąÆˆ ą®•ąÆą®±ą®æą®ŖąÆą®Ŗą®æą®ŸąÆą®ŸąÆą®³ąÆą®³ ą®…ą®³ą®µą®æą®²ąÆ ą®®ą®ŸąÆą®ŸąÆą®®ąÆ ą®Ŗą®Æą®©ąÆą®Ŗą®ŸąÆą®¤ąÆą®¤ąÆą®™ąÆą®•ą®³ąÆ. அளவு மிக ą®µąÆ‡ą®£ąÆą®Ÿą®¾ą®®ąÆ. ą®šą®æą®¤ąÆą®¤ą®°ą®¤ąÆą®¤ąÆˆ ą®Žą®©ąÆą®Ŗą®¤ąÆ ą®•ą®æą®“ą®™ąÆą®•ąÆą®µą®•ąÆˆą®ÆąÆˆą®šąÆ ą®šąÆ‡ą®°ąÆą®ØąÆą®¤ ą®šą®æą®±ą®ØąÆą®¤ ą®®ąÆ‚ą®²ą®æą®•ąÆˆ. ą®Øą®¾ą®ŸąÆą®ŸąÆ ą®®ą®°ąÆą®ØąÆą®¤ąÆą®•ąÆ ą®•ą®ŸąÆˆą®•ą®³ą®æą®²ąÆ ą®•ą®æą®ŸąÆˆą®•ąÆą®•ąÆą®®ąÆ. ą®ŖąÆ‚ą®£ąÆą®ŸąÆ பாகு ą®Øą®¾ą®ŸąÆą®ŸąÆ ą®šą®°ąÆą®•ąÆą®•ą®°ąÆˆ ஒரு ą®Ÿą®®ąÆą®Ŗą®³ą®°ąÆ + ą®ŖąÆ‚ą®£ąÆą®ŸąÆ நாலு ą®Ŗą®³ąÆą®³ąÆ ą®¤ąÆ‹ą®²ąÆą®Ÿą®©ąÆ ą®Øą®šąÆą®•ąÆą®•ą®æ

Error with duplicated entry in webform issue in Drupal

Issue:   Drupal\Core\Database\IntegrityConstraintViolationException : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'my_form-2' for key 'PRIMARY': UPDATE "webform" SET "next_serial"=:db_update_placeholder_0 WHERE "webform_id" = :db_condition_placeholder_0; Array ( [:db_update_placeholder_0] => 2 [:db_condition_placeholder_0] => my_form ) in Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException() (line 45 of core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php ). Fix: Delete from webform where webform_id='my_form' and next_serial=1

SSO

1.  IDP (Identity provider) Azure AD 2. SP (service provider) Any of your applications like Joomla, Moodle, Drupal 3. Authentication can be done via OAuth, SAML etc.. between IDP and SP. 4. Microsoft Office 365 uses Azure AD to authenticate users. 5.  OpenID Connect is an identity layer built on top of OAuth 2.0, providing authentication capabilities.

Deployment failure in Drupal

 In case, a config import error is coming because the new module is not installed then we can do the following function somemodule_update_10001() {   if (!\Drupal::service('module_handler')->moduleExists('new_module')) {     \Drupal::service('module_installer')->install(['new_module']);   } }

File upload security in Drupal

  finfo_file  https://www.drupal.org/project/file_upload_secure_validator/

Drupal example using migrate module, migrations, drush import, revert import

 https://www.drupal.org/project/path_redirect_import

Nginx config for redirect map

 Using 'Map' for redirects map_hash_bucket_size 128; map $uri $new_uri { /test-to-rewrite /test-rewritten; /test2-to-rewrite /test2-rewritten; } server { server_name example.com ; if ($new_uri) { return 301 $new_uri; } #... }         Source: https://www.dogsbody.com/blog/nginx-optimising-redirects/ Another example for using query strings: http {      map_hash_bucket_size 128;     map $uri$is_args$args $new_uri {         # /hello?123     /hello123?345;         include /my-location/redirect.tsv;         default         $uri$is_args$args;   # Default to the original URI if not matched     }    server {    location / {       if ($new_uri != $uri$is_args$args) {          return 302 $new_uri;       }     } } File...