Available online for free.
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://wadetregaskis.com/swiftui-main-thread-hang-detector/ | |
var body: some View { | |
SomeRootView { | |
… | |
}.task { | |
let approximateGranularity = Duration.milliseconds(10) | |
let threshold = Duration.milliseconds(50) | |
let clock = SuspendingClock() |
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
-- Prompt to select the invoice | |
set theInvoice to choose file with prompt "Please select an invoice:" | |
-- Get enclosing folder name | |
tell application "Finder" to set destinationFolder to container of theInvoice | |
log "Destination folder: " & destinationFolder | |
tell application "Pages" | |
activate | |
open theInvoice |
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
import Cocoa | |
protocol Shape { } | |
struct Triangle: Shape { } | |
// Function signature requires a concrete type T, it is specialized by T | |
// Think of it as having a unique function per type: | |
// - `protoflip(_ s: Triangle) -> Shape` | |
// - `protoflip(_ s: Square) -> Shape` |
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/swift sh | |
import Foundation | |
import PromiseKit // @mxcl ~> 6.5 | |
import Swifter // @mattdonnelly == b27a89 | |
let swifter = Swifter( | |
consumerKey: "FILL", | |
consumerSecret: "ME", | |
oauthToken: "IN", | |
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html" |
I hereby claim:
- I am jessesquires on github.
- I am jsq (https://keybase.io/jsq) on keybase.
- I have a public key whose fingerprint is BBAE BA80 7CF2 7BC2 5E5C FB43 1537 66AC 1FA1 A758
To claim this, I am signing this object:
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
git config --global alias.trim '!f() { git branch | grep -v "\*" | xargs -n 1 git branch -D; }; f' |
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
--- | |
layout: null | |
--- | |
{ | |
"version": "https://jsonfeed.org/version/1", | |
"title": "{{ site.title }}", | |
"home_page_url": "{{ site.url }}", | |
"feed_url": "{{ site.url }}/feed.json", | |
"description": "{{ site.description }}", |
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
# blog post | |
# | |
# https://www.jessesquires.com/blog/customizing-git-log/ | |
git log --graph --pretty=format:'commit: %C(bold red)%h%Creset %C(red)<%H>%Creset %C(bold magenta)%d %Creset%ndate: %C(bold yellow)%cd %Creset%C(yellow)%cr%Creset%nauthor: %C(bold blue)%an%Creset %C(blue)<%ae>%Creset%n%C(cyan)%s%n%Creset' |
NewerOlder