This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Mirrors the session to a log to work around Claude Code TUI limitations: | |
| # - inability to see full bash output (the ctrl+o expander is unreliable) | |
| # - inability to see web search results (the TUI shows only the query) | |
| # - inability to copy agent replies (/copy grabs too much; manual select drops formatting) | |
| # - inability to copy user prompts (the TUI adds indent and newline artifacts) | |
| log_file="${CLAUDE_LOG:-/tmp/claude.log}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "hooks": { | |
| "PreToolUse": [ | |
| { | |
| "matcher": "Bash", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "~/.claude/hooks/git-gate.sh" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "provider_name": "YouTube", | |
| "provider_url": "https://www.youtube.com/", | |
| "endpoints": [ | |
| { | |
| "schemes": [ | |
| "https://*.youtube.com/watch*", | |
| "https://*.youtube.com/v/*", | |
| "https://youtu.be/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){ | |
| const ticketNumber = | |
| /* If we are on a Jira board. */ | |
| location.search.match('[?&]selectedIssue=(.*?)([&]|$)')?.[1] || | |
| /* If we are on the ticket page. */ | |
| location.pathname.split('/').pop(); | |
| const ticketSummary = document.querySelector('h1[data-testid*="summary.heading"]').textContent.trim(); | |
| const ticketUrl = `${location.origin}/browse/${ticketNumber}`; | |
| const html = `<a href="${ticketUrl}">${ticketNumber} [${ticketSummary}]</a>`; | |
| const text = `[${ticketNumber} ${ticketSummary}](${ticketUrl})`; |
asd \ asd`
asd `` asd
asd ` asd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/.gitignore b/.gitignore | |
| index fc00ed5..ac82bec 100644 | |
| --- a/.gitignore | |
| +++ b/.gitignore | |
| @@ -5,6 +5,7 @@ web/core | |
| web/modules/contrib | |
| web/themes/contrib | |
| web/profiles/contrib | |
| +web/libraries | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Target: custom entity type, not config entity, nor content entity | |
| # implementation 1: | |
| - entity: EntityInterface | |
| - storage: EntityStorageInterface | |
| - query service: | |
| - QueryFactoryInterface | |
| - QueryInterface | |
| - ConditionInterface | |
| # implementation 2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/php | |
| <?php | |
| $input = file_get_contents('php://stdin'); | |
| preg_match('|^To: (.*)|', $input, $matches); | |
| $t = '/Users/alex/outgoing_mails/' . date('Y-m-d_H-i-s') . '---' . $matches[1] . '---' . uniqid() . '.eml'; | |
| file_put_contents($t, $input); | |
| chmod($t, 0666); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| solution: https://drupal.org/node/1145076#comment-7673535 |
NewerOlder