This file contains 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
import os | |
import json | |
import datetime | |
import time | |
import anthropic | |
import argparse | |
# pip install anthropic | |
from anthropic import Anthropic |
This file contains 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
/** | |
Simple category to adjust a view's frame in a contained scope. | |
No more need for littered local variable names. | |
Usage | |
----- | |
[view adjustFrame:^(CGRect *frame) { | |
frame->origin.x = 42.0; | |
}]; |
This file contains 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
static __weak id currentFirstResponder; | |
@implementation UIResponder (FirstResponder) | |
+(id)currentFirstResponder { | |
currentFirstResponder = nil; | |
[[UIApplication sharedApplication] sendAction:@selector(findFirstResponder:) to:nil from:nil forEvent:nil]; | |
return currentFirstResponder; | |
} |