Tags

10 pages

Snippet

How to switch between profiles in Claude Code

Claude Code does not provide native support for switching between multiple accounts or profiles. Having a personal Claude account for side projects and a separate work account for professional tasks means constantly logging in and out to switch between them. This is annoying and error-prone as it is easy to forget which account is active and accidentally use the wrong one.

Jenkins script to abort jobs on PR update

Test runs and sonarqube analysis for hybris projects are time-consuming and almost in each project it is required to abort CI jenkins job on branch update to reduce load on jenkins servers. Unfortunately there is no commonly used generic solution to solve this task.

Clean up old data in DB

Hybris has possibility to clean up old unnecessary data from a database. OOTB is provided CronJob to remove old CronJobs, but there is nothing to clean up custom item types or even Hybris item types, like business processes and task logs.

How to measure execution time of populators

Usually Hybris server has a slow performance in terms of RPS due to wrong usage of coverters and populators in controllers/facades. Main wrong usecases are: convert same Model into Data object few times populate Data object with all possible data instead of population only valuable for current page attributes To identify which populators are slow and executed more than once you can use such aspect:

Util class for dynamic attribute assigning

One of the pretty common case in Hybris customizations is to receive master data, for example Products, from external system and use hybris only for minor changes. In such cases business wants to have flexible system, which allows to customize attribute assigning via backoffice, impex files etc.

Git scripts to clean repository

As a Team Lead I want to see a clean git repository with branches, which are currently in development and not to see list of 3000+ branches, which was created from the first day of the project. Manual investigation and removing of obsolete branches will take ages, so I created few bash scripts, which will do the work automatically.

How to speed up groovy scripts

I had a task to optimize user creation and storing. Before changes on each anonymous checkout a new user was creates with ID in format RANDOM_UID|USER_EMAILand we had a lot of users who used anonymous checkout more than once. After changes only one user with ID in format USER_EMAIL for all anonymous checkouts was used. As a part of the task I need to migrate all old users to new format users. First version of moigration script had an execution time took more than 3 days for processing around 7 millions of people.