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
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 |
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 |
import Foundation | |
enum LayoutToken: StringLiteralConvertible { | |
case Plain(Int) | |
case Container(Int) | |
case ComponentId(Int) | |
func description() -> String{ | |
switch self { | |
case .Plain(let value): |
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" |
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" |
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; |