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
SETUP NEW MAC | |
============= | |
Use https://github.com/marcuswestin/machine |
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 | |
# | |
# Create a new monorepo by fusing multiple repositories. | |
# | |
# Exit immediately if a command exits with a non-zero status, | |
# and print commands and their arguments as they are executed. | |
set -ex | |
# Set the name of the org, and the monorepo to create | |
GITHUB_ORG="github-org-or-account" |
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
(git show-branch foo1 &>/dev/null) && (git checkout foo1) || (git checkout -b foo1) |
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
mkdir -p generated | |
sips -Z 29 --out generated/iPhoneSettings-29x29.png sourceIcon.png | |
sips -Z 58 --out generated/iPhoneSettings-29x29@2x.png sourceIcon.png | |
sips -Z 80 --out generated/iPhoneSpotlight-40x40@2x.png sourceIcon.png | |
sips -Z 120 --out generated/iPhoneApp-60x60@2x.png sourceIcon.png | |
sips -Z 29 --out generated/iPadSettings-29x29.png sourceIcon.png | |
sips -Z 58 --out generated/iPadSettings-29x29@2x.png sourceIcon.png | |
sips -Z 40 --out generated/iPadSpotlight-40x40.png sourceIcon.png |
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 | |
#if os(macOS) | |
typealias OSView = NSView | |
typealias OSViewRepresentable = NSViewRepresentable | |
#elseif os(iOS) | |
typealias OSView = UIView | |
typealias OSViewRepresentable = UIViewRepresentable | |
#endif |
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 {EditorState, EditorView, basicSetup} from "@codemirror/basic-setup" | |
import { foldEffect } from "@codemirror/fold"; | |
import { Line } from "@codemirror/text"; | |
import { Decoration, DecorationSet, PluginValue, ViewPlugin, ViewUpdate, WidgetType } from "@codemirror/view"; | |
let doc = ` | |
Test list 1 | |
- Test item | |
- Test item |
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 {EditorState, EditorView, basicSetup} from "@codemirror/basic-setup" | |
import { StateField } from "@codemirror/state"; | |
import { Line } from "@codemirror/text"; | |
import { Decoration, DecorationSet, WidgetType } from "@codemirror/view"; | |
let doc = ` | |
Test list 1 | |
- Test item | |
- Test item |
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
- (void)keyboardWillShow:(NSNotification *)notification { | |
[self performSelector:@selector(removeWebViewKeyboardBar) withObject:nil afterDelay:0]; | |
} | |
- (void)removeWebViewKeyboardBar { | |
UIWindow *keyboardWindow = nil; | |
for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) { | |
if (![[testWindow class] isEqual:[UIWindow class]]) { | |
keyboardWindow = testWindow; | |
break; |
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
// | |
// WrappableViewController.swift | |
// macOS-Wordflower | |
// | |
// Created by Marcus Westin on 1/24/20. | |
// Copyright © 2020 Marcus Westin. All rights reserved. | |
// | |
// My preferred approach to wrapping AppKit and UIKit viewControllers in SwiftUI |
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
// | |
// WrappableView.swift | |
// macOS-Wordflower | |
// | |
// Created by Marcus Westin on 1/24/20. | |
// Copyright © 2020 Marcus Westin. All rights reserved. | |
// | |
// My preferred approach to wrapping AppKit and UIKit views in SwiftUI |
NewerOlder