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
| // Usage | |
| let pixelBuffer: CVImageBuffer? = createPixelBufferFrom(image: image) // see https://gist.github.com/rampadc/10a7dc257552f1fb86c1fcc2d1671bd9 | |
| let sampleBuffer: CMSampleBuffer? = createSampleBufferFrom(pixelBuffer: pixelBuffer) | |
| // Function | |
| func createSampleBufferFrom(pixelBuffer: CVPixelBuffer) -> CMSampleBuffer? { | |
| var sampleBuffer: CMSampleBuffer? | |
| var timimgInfo = CMSampleTimingInfo() | |
| var formatDescription: CMFormatDescription? = nil |
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
| //https://nshipster.com/device-identifiers/ | |
| //Besides identifierForVendor.. | |
| /* | |
| Locale information is the greatest source of identifying information on Apple platforms. | |
| The combination of your preferred languages, region, calendar, time zone, | |
| and which keyboards you have installed say a lot about who you are | |
| especially if you have less conventional preferences. | |
| */ |
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
| #!/usr/bin/python2 | |
| import argparse | |
| import sys | |
| import subprocess | |
| from itertools import takewhile | |
| from macholib import MachO, ptypes | |
| def parse_rwx(text): | |
| return ('r' in text and 1) | ('w' in text and 2) | ('x' in text and 4) |
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
| @dynamicMemberLookup | |
| struct Apply<Base: AnyObject> { | |
| private let build: () -> Base | |
| private init(_ build: @escaping () -> Base) { | |
| self.build = build | |
| } | |
| init(_ base: Base) { | |
| self.build = { base } |
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
| * | |
| !*.m | |
| !Makefile |
NewerOlder