Skip to content

Instantly share code, notes, and snippets.

View gscalzo's full-sized avatar
👨‍🍳
Cooking...

Giordano Scalzo gscalzo

👨‍🍳
Cooking...
View GitHub Profile
@gscalzo
gscalzo / stephen-doc-writer.md
Created August 1, 2025 15:35
Stephen doc writer

name: stephen-doc-writer description: Use this agent when you need to update, consolidate, or create technical documentation at the end of development sessions. Examples: Context: User has just completed implementing a new feature and needs documentation updated. user: 'I just finished implementing the new authentication system. Can you update the documentation?' assistant: 'I'll use the stephen-doc-writer agent to update the documentation with the new authentication system details.' Since the user needs documentation updated after completing work, use the stephen-doc-writer agent to create comprehensive yet concise documentation. Context: User has scattered documentation across multiple files that needs consolidation. user: 'We have documentation spread across 5 different README files. Can you consolidate this?' assistant: 'I'll use the stephen-doc-writer agent to consolidate all the scattered documentation into a minimal number of well-organized files

@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

#!/bin/bash
pbpaste|sed 's/^[[:space:]]*"//g'|sed 's/"$//g' |sed 's/\\"/"/g'|sed 's/\\\\/\\/g'|pbcopy
@gscalzo
gscalzo / SpinnableArtworkPublic.swift
Last active March 13, 2016 11:27
SpinnableArtwork: 01 Public Interface
import UIKit
@IBDesignable
class SpinnableArtwork: UIView {
@IBOutlet var view: UIView!
@IBOutlet var artworkImageView: UIImageView!
@IBOutlet var playerButton: PlayerButton!
@IBInspectable var imageName: String! {
didSet {
Verifying that +giordano_scalzo is my blockchain ID. https://onename.com/giordano_scalzo
@gscalzo
gscalzo / From String To Token
Created May 11, 2015 13:12
From String To Token
import Foundation
enum LayoutToken: StringLiteralConvertible {
case Plain(Int)
case Container(Int)
case ComponentId(Int)
func description() -> String{
switch self {
case .Plain(let value):
@gscalzo
gscalzo / mixins2.swift
Created July 8, 2014 15:58
Need For Mixins: what I want
protocol Observable {
func observe(onUpdate: (Void) -> Void) -> String
func unobserve(key: String)
}
class ObservableDispatcher {
var observerClosures: Dictionary<String, (Void) -> Void> = Dictionary<String, (Void) -> Void>()
func observe(onUpdate: (Void) -> Void) -> String {
let key = "key_\(observerClosures.count+1)_key"
@gscalzo
gscalzo / mixins1.swift
Last active August 29, 2015 14:03
Need for Mixins: what I have
protocol Observable {
func observe(onUpdate: (Void) -> Void) -> String
func unobserve(key: String)
}
class ObservableDispatcher {
var observerClosures: Dictionary<String, (Void) -> Void> = Dictionary<String, (Void) -> Void>()
func observe(onUpdate: (Void) -> Void) -> String {
let key = "key_\(observerClosures.count+1)_key"
@gscalzo
gscalzo / QuickSort.swift
Created June 19, 2014 15:06
[Playground] Quicksort implementation in Swift
func qs<T: Comparable>(ary: T[]) -> T[] {
if ary.isEmpty {
return []
}
let x = ary[0]
let xs = ary[1..ary.count]
let smallerSorted = qs(Array(filter(xs) { $0 <= x }))
let biggerSorted = qs(Array(filter(xs) { $0 > x }))
-(void)setupInvaders {
NSMutableArray *start = [NSMutableArray array];
for (int i = 0; i < kInvaderRowCount*kInvaderColCount; ++i) {
[start addObject:@(i)];
}
CGPoint baseOrigin = CGPointMake(kInvaderSize.width / 2, 180);
RACSequence *aliens = [start.rac_sequence map:^(id value){
NSUInteger row = [value integerValue]/kInvaderColCount;
NSUInteger col = [value integerValue]%kInvaderColCount;