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 python3 | |
| """ | |
| Minimal MCP server that ships skills to Claude Code through the | |
| Skills extension (io.modelcontextprotocol/skills). | |
| It serves every folder inside ./skills that has a SKILL.md, builds the | |
| file manifest (SHA-256 digest and byte size for each file), and logs | |
| every request Claude Code sends to mcpskills_test_server.log. | |
| No dependencies. Python 3.9 or later. |
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": { | |
| "PostToolUse": [ | |
| { | |
| "matcher": "Write|Edit", | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "~/scripts/doc-generator.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
| import { Server } from '@modelcontextprotocol/sdk/server/index.js'; | |
| import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; | |
| import fs from 'fs/promises'; | |
| class TaskMCPServer { | |
| constructor() { | |
| this.server = new Server( | |
| { name: 'task-server', version: '1.0.0' }, | |
| { capabilities: { tools: {} } } | |
| ); |
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
| <?php | |
| // To change add to cart text on single product page | |
| add_filter( 'woocommerce_product_single_add_to_cart_text', 'storemizer_single_add_to_cart_text' ); | |
| function storemizer_single_add_to_cart_text() { | |
| return __( 'Buy Now', 'woocommerce' ); | |
| } | |
| // To change add to cart text on product archives(Collection) page | |
| add_filter( 'woocommerce_product_add_to_cart_text', 'storemizer_product_add_to_cart_text' ); | |
| function storemizer_product_add_to_cart_text() { |
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
| <?php | |
| /* Redirect user after check out */ | |
| add_action( 'template_redirect', 'njengah_custom_redirect_after_purchase' ); | |
| function njengah_custom_redirect_after_purchase() { | |
| global $wp; | |
| if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) { |
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
| <?php | |
| /** | |
| * Create numeric pagination in WordPress | |
| */ | |
| // Get total number of pages | |
| global $wp_query; | |
| $total = $wp_query->max_num_pages; | |
| // Only paginate if we have more than one page |
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
| <?php | |
| /** | |
| * Skip Cart and Redirect to Checkout | |
| * Add to functions.php of child theme | |
| */ | |
| add_filter('woocommerce_add_to_cart_redirect', 'njengah_skip_cart_redirect_to_checkout_page'); | |
| function njengah_skip_cart_redirect_to_checkout_page() { |
NewerOlder