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
// A minimal iOS app set up entirely in code using Objective-C rather than using a storyboard and UIApplicationSceneManifest in the Info.plist. | |
// Last updated for iOS 18. | |
// Swift version: https://gist.github.com/douglashill/b8125f7e2336b6a47461df0d4898f64d | |
@import UIKit; | |
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate> | |
@end | |
@implementation SceneDelegate |
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
Hop into a shell and to the root directory of your project and run | |
git ls-tree --name-only -z -r HEAD -- $1 | xargs -0 -n1 git blame --line-porcelain | grep "^author "|sort|uniq -c|sort -nr | |
Then wait a bit. You get a nice sorted list of lines of code and author name. | |
Add it to your bash profile like this | |
whodunit() { | |
git ls-tree --name-only -z -r HEAD -- $1 | xargs -0 -n1 git blame --line-porcelain | grep "^author "|sort|uniq -c|sort -nr | |
} |