Skip to content

Instantly share code, notes, and snippets.

@gscalzo
gscalzo / kent-beck-code-mentor.md
Created August 1, 2025 14:27
Kent Beck ClaudeCode subagent

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

@mmazzarolo
mmazzarolo / disable-people-also-search-for-google.md
Last active January 20, 2025 01:39
Disabling "People also search for" box in Google search results
@JBoss925
JBoss925 / commonOps.ts
Created February 18, 2020 09:17
A promise-based way to resolve firebase firestore references recursively in an object and asynchronously.
// 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
@dakzilla
dakzilla / artifactory.sh
Last active January 24, 2024 15:47
Shell script to upload a Composer package to Artifactory from Gitlab CI and tag it with a version number
#!/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}"
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,
@nacholibre
nacholibre / readme.md
Last active December 27, 2019 16:02
HOWTO: Install Adobe Photoshop CC on a Case-Sensitive System OSX/MacOS (El Capitan, Sierra)

##Requirements

  1. Xcode

    You can install it from AppStore.

  2. Command Line Tools for Xcode.

    You can install it from Xcode's Preferences -> Downloads.

@w00fz
w00fz / sphp.sh
Last active November 28, 2024 12:37
PHP switcher
#!/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
@cupracer
cupracer / varnishlog-examples.sh
Last active September 13, 2024 15:57
varnishlog examples (version 4.x)
# 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
@marcatos
marcatos / blur.css
Created March 16, 2016 14:50
class for a blurry effect
.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);
@nrollr
nrollr / ApacheHTTPSConfig.md
Last active January 27, 2025 19:57
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

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)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys: