name: kent-beck-code-mentor description: Use this agent when you need expert guidance on code simplicity, readability, and maintainability. Perfect for code reviews, refactoring suggestions, or when you want to improve existing code following Kent Beck's principles of simple design and extreme programming practices. Examples: Context: User has written a complex function with multiple responsibilities and wants to improve it. user: 'I wrote this function that handles user authentication, logging, and data validation all in one place. It works but feels messy.' assistant: 'Let me use the kent-beck-code-mentor agent to review this code and provide suggestions for simplification and better separation of concerns.' Context: User is designing a new feature and wants guidance on keeping it simple and extensible. user: 'I'm about to implement a notification system that needs to handle email, SMS, and push notifications. How should I structure this?' assistant: 'I'll use the kent-beck-c
I just published a blog post with a few other options and info on decluttering Google's search results 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
| // This file contains common operations that will need to be performed often. | |
| import { firestore } from "firebase"; | |
| import { isUndefined } from "util"; | |
| /** | |
| * This function takes a collection reference and turns it into an array | |
| * of its constituent document references | |
| * | |
| * @param coll the collection to convert into a docref array |
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 -e | |
| # Variables | |
| COMPOSER_NAME="$(cat composer.json | jq -r '.name')" | |
| PROJECT_NAME="$(echo ${COMPOSER_NAME} | cut -d'/' -f 2)" | |
| BUILD_NAME="${PROJECT_NAME}-${CI_COMMIT_TAG}.zip" | |
| ARTIFACTORY_REPOSITORY="php" | |
| ARTIFACTORY_PATH="${ARTIFACTORY_REPOSITORY}/${COMPOSER_NAME}" |
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
| SELECT | |
| "Zettr\\Handler\\Magento\\CoreConfigData" AS handler, | |
| scope AS param1, | |
| scope_id AS param2, | |
| path AS param3, | |
| "" AS groups, | |
| IFNULL(`value`, '') AS `default`, | |
| '' AS devbox, | |
| '' AS deploy, | |
| '' AS latest, |
##Requirements
-
Xcode
You can install it from AppStore.
-
Command Line Tools for Xcode.
You can install it from Xcode's Preferences -> Downloads.
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
| #!/bin/bash | |
| # Check if command was ran as root. | |
| if [[ $(id -u) -eq 0 ]]; then | |
| echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
| echo "When a service requires root access, you will be prompted for a password as needed." | |
| exit 1 | |
| fi | |
| # Usage |
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
| # filter by request host header | |
| varnishlog -q 'ReqHeader ~ "Host: example.com"' | |
| # filter by request url | |
| varnishlog -q 'ReqURL ~ "^/some/path/"' | |
| # filter by client ip (behind reverse proxy) | |
| varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"' | |
| # filter by request host header and show request url and referrer header |
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
| .blur { | |
| -webkit-filter: blur(5px); | |
| -moz-filter: blur(5px); | |
| -o-filter: blur(5px); | |
| filter: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><filter id="blur"><feGaussianBlur in="SourceGraphic" stdDeviation="5" /></filter></svg>#blur'); | |
| -moz-transition: all 300ms ease; | |
| -o-transition: all 300ms ease; | |
| -webkit-transition: all 300ms ease; | |
| transition: all 300ms ease; | |
| -webkit-transform: translateZ(0); |
The following will guide you through the process of enabling SSL on a Apache webserver
- The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
- The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"
Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:
NewerOlder
