Commands to get commit statistics for a Git repository from the command line -
using git log
, git shortlog
and friends.
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
#!/bin/bash | |
# | |
# Updates all plug-ins to be compatible with the latest Xcode and Xcode-beta | |
# | |
plugins_location="~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins" | |
# Get Xcode's version | |
current_xcode_version="$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID)" |
Values of macros from TargetConditionals.h.
Xcode 7 / iOS 9.1, tvOS 9.0, watchOS 2.0, OS X 10.11 SDKs
Macro | 🖥 | 📱 | 📱sim | ⌚️ | ⌚️sim | 📺 | 📺sim |
---|---|---|---|---|---|---|---|
TARGET_OS_MAC |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
TARGET_OS_IPHONE |
0 | 1 | 1 | 1 | 1 | 1 | 1 |
TARGET_OS_IOS |
0 | 1 | 1 | 0 | 0 | 0 | 0 |
TARGET_OS_WATCH |
0 | 0 | 0 | 1 | 1 | 0 | 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
COMPACT WIDTH (stacked view) | |
- 320 x 568 pt | |
-> iPhone 5, 5s | |
- 320 x 768 pt | |
-> iPad 9.7" Split Landscape 2/3 right | |
- 320 x 834 pt | |
-> iPad 10.5" Split Landscape 2/3 right | |
- 320 x 1024 pt | |
-> iPad 9.7" Split Portrait right |
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
slack://channel?id=<channel/group/user-id>&team=<team-id> |
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
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
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
// requires a bridging header with this: | |
// #import <CommonCrypto/CommonCrypto.h> | |
func MD5(_ string: String) -> String? { | |
let length = Int(CC_MD5_DIGEST_LENGTH) | |
var digest = [UInt8](repeating: 0, count: length) | |
if let d = string.data(using: String.Encoding.utf8) { | |
d.withUnsafeBytes { (body: UnsafePointer<UInt8>) in | |
CC_MD5(body, CC_LONG(d.count), &digest) | |
} |
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
*.strings utf16 diff=localizablestrings |
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
- (NSString *)tableView:(UITableView *)tableView titleForSwipeAccessoryButtonForRowAtIndexPath:(NSIndexPath *)indexPath { | |
return @"More"; | |
} | |
- (void)tableView:(UITableView *)tableView swipeAccessoryButtonPushedForRowAtIndexPath:(NSIndexPath *)indexPath { | |
NSLog(@"I wanted to be a pretty public API, but then time ran out and they forgot me..."); | |
// Hide the More/Delete menu. | |
[self setEditing:NO animated:YES]; | |
} |