Model(s) | Physical Size | Points (Standard) | Points (Zoomed) | Scale | Device Resolution | Screen Resolution |
---|---|---|---|---|---|---|
iPhone 15 Pro Max | 6.7" | 430 x 932 | 375 x 812 | @3x | 1290 x 2796 | 1290 x 2796 |
iPhone 15 Pro | 6.1" | 393 x 852 | 320 x 693 | @3x | 1179 x 2556 | 1179 x 2556 |
iPhone 15 Plus | 6.7" | 430 x 932 | 375 x 812 | @3x | 1290 x 2796 | 1290 x 2796 |
iPhone 15 | 6.1" | 393 x 852 | 320 x 693 | @3x | device res | 1179 x 2556 |
iPhone 14 Pro Max | 6.7" | 430 x 932 | 375 x 812 | @3x | 1290 x 2796 | 1290 x 2796 |
iPhone 14 Pro | 6.1" | 393 x 852 | 320 x 693 | @3x | 1179 x 2556 | 1179 x 2556 |
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
#if canImport(Combine) | |
import Foundation | |
import Combine | |
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) | |
extension URLSession { | |
public typealias DataTaskProgressPublisher = | |
(progress: Progress, publisher: AnyPublisher<DataTaskPublisher.Output, Error>) |
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
# This removes the unsupported archetypes from frameworks on the build phase. | |
echo "Target architectures: $ARCHS" | |
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" | |
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK | |
do | |
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) | |
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" | |
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" |
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
OVERVIEW: Swift compiler | |
USAGE: swiftc [options] <inputs> | |
MODES: | |
-dump-ast Parse and type-check input file(s) and dump AST(s) | |
-dump-parse Parse input file(s) and dump AST(s) | |
-dump-scope-maps <expanded-or-list-of-line:column> | |
Parse and type-check input file(s) and dump the scope map(s) | |
-dump-type-refinement-contexts |
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 UIKit | |
extension UIView { | |
// In order to create computed properties for extensions, we need a key to | |
// store and access the stored property | |
fileprivate struct AssociatedObjectKeys { | |
static var tapGestureRecognizer = "MediaViewerAssociatedObjectKey_mediaViewer" | |
} | |
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 | |
set -e | |
# Clean out /var/cache/apt/archives | |
apt-get clean | |
# Fill it with all the .debs we need | |
apt-get --reinstall -dy install $(dpkg --get-selections | grep '[[:space:]]install' | cut -f1) | |
DIR=$(mktemp -d -t info-XXXXXX) | |
for deb in /var/cache/apt/archives/*.deb |
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
internal let DEFAULT_MIME_TYPE = "application/octet-stream" | |
internal let mimeTypes = [ | |
"html": "text/html", | |
"htm": "text/html", | |
"shtml": "text/html", | |
"css": "text/css", | |
"xml": "text/xml", | |
"gif": "image/gif", | |
"jpeg": "image/jpeg", |
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
//Inspired by: http://planetozh.com/blog/2012/10/generate-random-pronouceable-words/ | |
func randomWord(wordLength: Int = 6) -> String { | |
let kCons = 1 | |
let kVows = 2 | |
var cons: [String] = [ | |
// single consonants. Beware of Q, it"s often awkward in words | |
"b", "c", "d", "f", "g", "h", "j", "k", "l", "m", | |
"n", "p", "r", "s", "t", "v", "w", "x", "z", |
Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.
For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.
This gives an ongoing list of file-type magic numbers.
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
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
NewerOlder