https://www.nintendo.com.hk/data/json/switch_software.json
https://www.nintendo.co.jp/data/software/xml/switch.xml
| model: claude-opus-4-20250514 | |
| messages: | |
| - role: user | |
| content: | |
| - type: text | |
| text: | | |
| <system-reminder> | |
| As you answer the user's questions, you can use the following context: | |
| # important-instruction-reminders | |
| Do what has been asked; nothing more, nothing less. |
| // theme.layouts.yml | |
| theme_8_4: | |
| label: 'Particle 66:33' | |
| path: templates/layout/theme-8-4 | |
| template: theme-8-4 | |
| category: 'Columns: 66:33' | |
| default_region: main | |
| icon_map: | |
| - [main, main, aside] | |
| regions: |
| <?php | |
| namespace Drupal\example\Plugin\Block; | |
| use Drupal\Core\Block\BlockBase; | |
| use Drupal\Component\Render\FormattableMarkup; | |
| /** | |
| * Provides the full name of the author of the given node from context. | |
| * |
| <?php | |
| use Drupal\Core\Database\Database; | |
| use Drupal\migrate\Plugin\MigrationInterface; | |
| use Drupal\migrate\Row; | |
| use Drupal\migrate\Plugin\MigrateSourceInterface; | |
| /** | |
| * Populate vocab renaming tables from our csv source file with the old name and new name - this |
| /* | |
| // Used like so: | |
| onEvent('click', '.foo', (el) => { | |
| // Element that was clicked. | |
| console.log(el) | |
| }) | |
| */ | |
| // Event delegation helper. | |
| const onEvent = (event, selector, f) => { |
| # SPECIFIC: Block #submit #validate #process #pre_render #post_render #element_validate #after_build #value_callback parameters | |
| SecRule REQUEST_FILENAME "(index\.php|\/$)" "chain,id:003294,t:lowercase,t:none,t:utf8toUnicode,t:urlDecodeUni,t:urldecode,block" | |
| SecRule REQUEST_METHOD "^(GET|POST|HEAD)$" chain | |
| SecRule ARGS_NAMES|REQUEST_COOKIES_NAMES "^\#(submit|validate|pre_render|post_render|element_validate|after_build|value_callback|process)$|\[(?:\'|\")?#(submit|validate|pre_render|post_render|element_validate|after_build|value_callback|process)" | |
| # GENERIC: Block all parameters starting with # | |
| SecRule REQUEST_FILENAME "(index\.php|\/$)" "chain,id:003309,t:lowercase,t:none,t:utf8toUnicode,t:urlDecodeUni,t:urldecode,block" | |
| SecRule REQUEST_METHOD "^(GET|POST|HEAD)$" chain |
| // PHP snippet included in wp-config.php (or settings.php). | |
| // Including from that location in a separate file is OK as well. | |
| <?php | |
| // Remove any leading "www." from the host name. | |
| $redirect_host = str_replace('www.', '', $_SERVER['HTTP_HOST']); | |
| $redirect_path = strtolower(rtrim($_SERVER['REQUEST_URI'])); | |
| if (strlen($redirect_path) > 2) { | |
| $redirect_path = rtrim($redirect_path, '/'); | |
| } |
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. |