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
| cask_args appdir: "/Applications" | |
| tap "homebrew/cask-fonts" | |
| brew "mas" | |
| #### LAPTOPS #### | |
| #cask "tripmode" | |
| #### LAPTOPS #### | |
| mas "Boop", id: 1518425043 |
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
| demo |
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 SwiftUI | |
| import PhotosUI | |
| struct CustomPhotoPickerView: UIViewControllerRepresentable { | |
| @Binding var selectedImage: UIImage? | |
| @Binding var date: Date? | |
| @Binding var location: CLLocationCoordinate2D? | |
| @Environment(\.presentationMode) var presentationMode |
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 SwiftUI | |
| private class IntegerTextFieldValue: ObservableObject { | |
| @Published var value = "" { | |
| didSet { | |
| let numbersOnly = value.filter { $0.isNumber } | |
| if value != numbersOnly { | |
| value = numbersOnly | |
| } | |
| } |
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
| require "rubygems" | |
| require "twitter" | |
| # get these from apps.twitter.com | |
| CONSUMER_KEY = "foo" | |
| CONSUMER_SECRET = "bar" | |
| OAUTH_TOKEN = "blee" | |
| OAUTH_TOKEN_SECRET = "baz" | |
| TWITTER_USER = "your_username" # needs to be the one associated with keys above |
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/env bash | |
| # Build Phase Script for copying and signing libReveal based on Configuration | |
| # https://gist.github.com/Ashton-W/6db611ac93be2f8bad7f | |
| set -o errexit | |
| set -o nounset | |
| LIBREVEAL_PATH="/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib" | |
| INJECT_REVEAL="${INJECT_REVEAL:-NO}" |
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/env bash | |
| # Build Phase Script for use in Xcode | |
| # Copy Resources based on Configuration | |
| # | |
| # https://gist.github.com/Ashton-W/a47ec8b128ecbe470632 | |
| set -o nounset | |
| # From Build Environment |
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
| #!/bin/sh | |
| # make sure you have imagemagick installed: brew install imagemagick | |
| # your app_icons.sh file should have the correct permissions: run `chmod 775 app_icons.sh` in your terminal from where you put this file | |
| # put your `my_icon.png` next to this file and run ./app_icons.sh to export your app icons | |
| x=my_icon.png | |
| y=${x%.*} | |
| # delete the export directory so we start clean |
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
| 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 |