Lorem ipsum dolor sit amet, consectetur adipiscing elit[<sup id="footnote-id">1</sup>](#fn1).
### Footnotes
1. <span id="fn1"></span> [_consectetur adipiscing elit_](#footnote-id). Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
View String+Random.swift
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
extension String { | |
enum RandomStringGenerationError: Error { | |
case secRandomCopyBytesFailed(status: Int32) | |
} | |
/// Returns a cryptographically secure string generated with characters from the given `Set<Character>` and with length | |
/// `length`. | |
/// | |
/// - Complexity: O(n) where n is the given `length`. |
View hard-vs-soft-wrap-diffing-example.diff
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
// I find hard-wrapping better because it makes it easier to diff changes over | |
// long line **without** relying on the tool of choice supporting | |
// soft-wrapping. Change at the end of a "long" line | |
// Change at the end of a "long" line | |
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatypo. | |
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | |
// Change with 80 characters hard-wrap | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor |
View ExampleView.swift
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 SwiftUI | |
struct ExampleView: View { | |
var body: some View { | |
VStack { | |
Text("Title").bold() | |
Text("Subtitle") | |
} | |
} | |
} |
View Date+SyntaxSugar.swift
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
extension Date { | |
static func with(calendar: Calendar = .current, year: Int, month: Int, day: Int) -> Date { | |
// Because the `calendar` value is non-nil, it's safe to force unwrap the `date` value | |
DateComponents(calendar: calendar, year: year, month: month, day: day).date! | |
} | |
} |
View Fastfile
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
# | |
# Proper version | |
# | |
WRAP_EMOJI = "🌯" | |
lane :test do |options| | |
UI.message wrap_in_emoji("Hello, World!") | |
end | |
def wrap_in_emoji(string) |
View repro-3708.sh
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 | |
# I run this only on macOS | |
set -ex | |
ISSUE=3708 | |
ROOT_DIR=/tmp/repro-$ISSUE | |
rm -rf $ROOT_DIR |
View md_footnotes.md
View tables.md
This:
heading 1 | heading 2 | heading 3
--- | --- | ---
abc | bcd | cde
def | efg | fgh
becomes this:
View Gmail_Web_Keyboard_Shortcuts.md
Action | Shortcut |
---|---|
Add a Cc | ⇧⌘c |
Mark as unread | ⇧u |
Undo | z |
NewerOlder