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
| # Claude Code: Custom Bash Permission Hook | |
| A minimal example showing how to create a custom permission hook that auto-approves, denies, or prompts for Bash commands in Claude Code. | |
| ## How It Works | |
| When Claude Code wants to run a Bash command, it triggers a `PermissionRequest` event. Your hook script receives JSON on stdin and decides: | |
| | Output | Result | | |
| |--------|--------| |
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": { | |
| "SessionStart": [ | |
| { | |
| "hooks": [ | |
| { | |
| "type": "command", | |
| "command": "${CLAUDE_PLUGIN_ROOT}/scripts/workdir-persistence.sh", | |
| "timeout": 10 | |
| } |
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
| File: <contents> | |
| Issues: 4 | |
| Line 1: Dockerfile | |
| Issue Category Title Description | |
| 1 Possible Bug Missing Required All commands in a Dockerfile require at least 1 argument. | |
| Arguments A line in a Dockerfile can be in any of the following formats: | |
| * * * | |
| #### `# Comment` |
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
| { | |
| "basics": { | |
| "name": "Michael T. Halligan", | |
| "label": "Infrastructure as Code & DevOps Engineer", | |
| "location": { | |
| "city": "Istanbul", | |
| "timezone": "UTC+3" | |
| }, | |
| "email": "forrecruiteremail@gmail.com", | |
| "profiles": [ |
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
| # CloudWatch Log Group metric filters for driftctl-slack. | |
| module "filter" { | |
| for_each = var.cloudwatch_log_filters | |
| source = "terraform-aws-modules/cloudwatch/aws//modules/log-metric-filter" | |
| version = "3.3.0" | |
| log_group_name = local.aws_cloudwatch_log_group | |
| metric_transformation_name = each.key | |
| metric_transformation_namespace = "drifctl.scan" | |
| metric_transformation_value = var.cloudwatch_log_filters[each.key].metric_value |
I hereby claim:
- I am cruftyoldsysadmin on github.
- I am cruftyold (https://keybase.io/cruftyold) on keybase.
- I have a public key ASAw1b89MQEorjvS9Dn6j8x1md7c-u6nGuY923pZnNVYOwo
To claim this, I am signing this object:
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
| // Initialize two arrays | |
| ary1 = [] | |
| ary2 = [] | |
| // Iterate over each array | |
| for ary in [ary1, ary2] { | |
| // Set initial value of counter to 0 for an array index | |
| count = 0 | |
| // Do this 1000 times |
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 python2.7 | |
| """ | |
| Usage: {prog} --user username \ | |
| --password password \ # Either password or Passfile is required | |
| --passfile /etc/rabbitmq/secret \ | |
| --url http://localhost:15672/api/nodes/rabbitmq@dev-rmq-01 \ | |
| --metric partitions \ | |
| --metricname displayname.of.metric (optional)\ | |
| --debug (optional) |
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 python | |
| # pw_push() Pushes password to pwpush.com | |
| # | |
| def pw_push(password): | |
| pwp_token = requests.post('https://pwpush.com/p.json', data = | |
| { | |
| 'password[payload]' : password, | |
| 'password[expire_after_day]' : 5, | |
| 'password[expire_after_views]' : 5, |
NewerOlder