name: Hook Development description: >- This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "implement agent hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", "frontmatter hooks", "scoped hooks", "once: true", or mentions hook events (PreToolUse, PostToolUse, Stop,
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
| tutors = ["***", "***", "***"] | |
| girls = ["***", "***", "***"] | |
| number = "To be defined" | |
| tutors = tutors.shuffle(random: Random.new(number)) | |
| girls = girls.shuffle(random: Random.new(number)) | |
| result = Hash.new { |hash, key| hash[key] = [] } | |
| tutors.cycle(3).each_with_index do |tutor, i| | |
| result[tutor] << (girls[i] || "未配对") |
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
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
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 | |
| # coding: utf-8 | |
| import datetime | |
| import logging | |
| import os | |
| import re | |
| import subprocess | |
| import time | |
| from functools import wraps |
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
| # Chinese (China) translations for Devise(3.5.2) | |
| # by Kenrick-Zhou (https://github.com/Kenrick-Zhou) | |
| # https://gist.github.com/Kenrick-Zhou/7909822 | |
| zh-CN: | |
| devise: | |
| confirmations: | |
| confirmed: "您的帐号已经确认,您现在已登录。" | |
| send_instructions: "几分钟后,您将收到确认帐号的电子邮件。" | |
| send_paranoid_instructions: "如果您的邮箱存在于我们的数据库中,您将收到一封确认账号的邮件。" |
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
| 规范: | |
| 1、标点符号使用全角 | |
| 2、保留原文中一切标记如<span>,只翻译文字部分 | |
| 3、必要时在括号中引用原文术语,如"方法(methods)" | |
| 字典: | |
| calling: 调用 | |
| introduction: 介绍 | |
| object, objects: 对象 | |
| primer: 初学者 |
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
| 规范: | |
| 1、标点符号使用全角 | |
| 2、保留原文中一切标记如<span>,只翻译文字部分 | |
| 3、必要时在括号中引用原文术语,如"方法(methods)" | |
| 字典: | |
| calling: 调用 | |
| introduction: 介绍 | |
| object, objects: 对象 | |
| primer: 初学者 |
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
| # == Active Model North American Telephone Number Validator | |
| # http://en.wikipedia.org/wiki/North_American_Numbering_Plan#Current_system | |
| # [Author] Roger Rohrbach (roger@ecstatic.com) | |
| class NanpValidator < ActiveModel::EachValidator | |
| def self.matcher(require_area_code) # :nodoc: | |
| %r{ | |
| (?<country_code> \+1 ){0} | |
| (?<trunk_prefix> 1 ){0} | |
| (?<delimiter> ([-\.]|\ +) ){0} |
NewerOlder