From .cursorrules to .ai/: How I Unified My Cursor and Claude Config Into One Place
For a while, my .cursorrules file was doing fine.
For a while, my .cursorrules file was doing fine.
I recall a moment when I was working on migrating an old Drupal 7 custom Views filter into a Drupal 11 module.
Have you noticed how everyone's talking about AI coding assistants these days? "Just describe what you want and the AI writes the code!" Sounds amazing, right?
> show processlist;tail -n5000 access.log|awk '{print $1}' | sort | uniq -c | sort -nr | head -10Have you noticed how the Drupal view sort filters look like when you expose them?
<?php
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\MigrateMessage;
use Drupal\migrate\MigrateExecutable;
$manager = \Drupal::service('plugin.manager.migration');
$migration_ids = ['migration_machine_name'];
foreach ($migration_ids as $migration_id) {
$migration = $manager->createInstance($migration_id);
// update existing entity imported.
$migration->getIdMap()->prepareUpdate();
$executable = new MigrateExecutable($migration, new MigrateMessage());
try {
// Run the migration.
$executable->import();
}
caDrupal 10 comes with CKEditor 5 by default included in the core, at one point in time I had to limit the allowed HTML tags, however, I realized we are NOT longer able to manually overwrite the `All
Prob. there are better ways or alternatives, but the next way works for me!
A route definition:
keboca.another_route:
path: '/something/else'
defaults:
uri: '/valid_uri'
_controller: '\Drupal\keboca\Controller\KController::forward'
The trick happens here:
gitback() {
BRANCH_NAME=${1:-$(git branch --show-current)}
git checkout dev &&
git pull origin dev &&
git remote prune origin &&
git branch -D "$BRANCH_NAME" &&
git remote show origin &&
git status
}
alias git-back='gitback'