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
| /** | |
| * Transforms Object into an array of key value pairs. | |
| */ | |
| @Pipe({ name: 'entries' }) | |
| export class KeyValueEntriesPipe implements PipeTransform { | |
| transform<T extends { [p in keyof T]: T[keyof T] }>(input: T): { key: keyof T, value: T[keyof T] }[] { | |
| const entries: { key: keyof T, value: T[keyof T] }[] = []; | |
| for (const key in input) { | |
| if (input.hasOwnProperty(key)) { | |
| entries.push({ key, value: input[key] }); |
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
| #!/bin/sh | |
| frameworks=$(otool -L $BUILT_PRODUCTS_DIR/$EXECUTABLE_PATH | pcregrep -o1 "@rpath/(.*?\.framework)") | |
| index=0 | |
| for framework in $frameworks; do | |
| if [ -e "$SRCROOT/Carthage/Build/iOS/$framework" ]; then | |
| export "SCRIPT_INPUT_FILE_$index"="$SRCROOT/Carthage/Build/iOS/$framework" | |
| export "SCRIPT_OUTPUT_FILE_$index"="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/$framework" | |
| let index=index+1 |
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
| import UIKit | |
| /** | |
| Swizzles `addSubview` of `UIView`, replacing it with an implementatio that ensures it is always | |
| invoked on the main thread. | |
| Call this method in your application entry point, e.g. the `UIApplicationDelegate`. | |
| */ | |
| func swizzleAddSubview() { | |
| let clazz = UIView.self |
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
| $url = "http://csgolounge.com/match?m=3071"; | |
| $id = str_replace("http://csgolounge.com/match?m=", "", $url); |
NewerOlder