Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
sensor: | |
- platform: imap_email_content | |
server: imap.gmail.com | |
name: xfinity_status | |
port: 993 | |
username: !secret xfinity_email | |
password: !secret xfinity_password | |
senders: | |
- [email protected] | |
value_template: >- |
import SwiftUI | |
extension View { | |
/// Proposes a percentage of its received proposed size to `self`. | |
/// | |
/// This modifier multiplies the proposed size it receives from its parent | |
/// with the given factors for width and height. | |
/// | |
/// If the parent proposes `nil` or `.infinity` to us in any dimension, | |
/// we’ll forward these values to our child view unchanged. |
import SwiftUI | |
enum OSDocumentError: Error { | |
case unknownFileFormat | |
} | |
#if canImport(UIKit) | |
import UIKit |
#!/bin/sh | |
# usage: | |
# ql /tmp/file.jpg | |
# cat /tmp/file.jpg | ql | |
# cal -h | ql | |
if [ -z "$*" ]; then | |
cat > /tmp/ql.stdin | |
mime_type=$(file --brief --mime-type /tmp/ql.stdin) |
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
// | |
// KeyCommand.swift | |
// Adds Keyboard Shortcuts to SwiftUI on iOS 13 | |
// See https://steipete.com/posts/fixing-keyboardshortcut-in-swiftui/ | |
// License: MIT | |
// | |
// Usage: (wrap view in `KeyboardEnabledHostingController`) | |
// Button(action: { | |
// print("Button Tapped!!") | |
// }) { |
Here's what needs to be done in order to use security scoped bookmarks on Mac Catalyst:
You need an entitlement: "com.apple.security.files.bookmarks.app-scope" needs to be se to 1.
Pass both NSURLBookmarkCreationWithSecurityScope
and NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess
when creating the bookmark.
Note: The headers mark these API as unavailable for iOS, and this indeed does only work on Mac and not iOS. However, Mac Catalyst really is a Mac app, so using these values is fine. In order to allow compilation, use following:
#!/usr/bin/env bash | |
# Usage: sudo ./restore_functionality.sh | |
#ps aux | grep sentinel | awk -F " +" '{print $2}' | xargs kill | |
while true; do | |
launchctl kill SIGKILL system/com.crowdstrike.falcond | |
launchctl kill SIGKILL system/com.crowdstrike.userdaemon | |
launchctl kill SIGKILL system/com.sentinelone.sentineld | |
launchctl kill SIGKILL system/com.sentinelone.sentineld-helper |
At WWDC 2019 Apple released some videos directly online, with no corresponding live session. This is a list of those videos with links to the video pages.
Some sessions were presented during WWDC but then split into multiple videos when posted online. This list includes the online versions, since they don't appear in the WWDC schedule. For example WWDC included session 711, "Introducing Combine and Advances in Foundation". This was split into two online videos-- 722, "Introducing Combine", and 723, "Advances in Foundation". Both 722 and 723 are included here.