Note: For now, Apple Silicon users need to be set up for x86 mode
First, download Go or brew install go. Then, put largetype.go in a directory called largetype and from there run:
$ go mod init largetype
Note: For now, Apple Silicon users need to be set up for x86 mode
First, download Go or brew install go. Then, put largetype.go in a directory called largetype and from there run:
$ go mod init largetype
Before we get started…
Prefer script-src-elem over script-src for better cross-browser support of this solution.
I have a variation on this solution using embedded workers with blob URLs at https://gist.github.com/dfkaye/14e5cc5dbe5bb38a9d80f25f54061c7f.
| FROM golang:1.11-alpine as builder | |
| WORKDIR /myapp | |
| COPY go.mod . | |
| COPY go.sum . | |
| RUN apk add --no-cache ca-certificates git | |
| # Get dependancies - will also be cached if we won't change mod/sum | |
| RUN go mod download |
| // A minimal iOS app set up entirely in code using Objective-C rather than using a storyboard and UIApplicationSceneManifest in the Info.plist. | |
| // Last updated for iOS 18. | |
| // Swift version: https://gist.github.com/douglashill/b8125f7e2336b6a47461df0d4898f64d | |
| @import UIKit; | |
| @interface SceneDelegate : UIResponder <UIWindowSceneDelegate> | |
| @end | |
| @implementation SceneDelegate |
| // Package main is a sample macOS-app-bundling program to demonstrate how to | |
| // automate the process described in this tutorial: | |
| // | |
| // https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 | |
| // | |
| // Bundling the .app is the first thing it does, and creating the DMG is the | |
| // second. Making the DMG is optional, and is only done if you provide | |
| // the template DMG file, which you have to create beforehand. | |
| // | |
| // Example use: |
| let providerHandler = { | |
| get: async(target, name) => { | |
| console.log('load someting from remote...') | |
| return new Promise( (res, rej) => { | |
| setTimeout(() => res(42), 4200) | |
| }) | |
| }, | |
| set: function (obj, prop, value) { | |
| return new Promise((res, rej) => { |
The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.
Example:
# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com| ObjC.import('Cocoa') | |
| function UserInterface() { | |
| this.okButton = Button(300, 10, 90, 26); { | |
| this.okButton.title = 'OK' | |
| } | |
| this.cancelButton = Button(210, 10, 90, 26); { | |
| this.cancelButton.title = 'Cancel' | |
| this.cancelButton.keyEquivalent = '\u{1b}' | |
| } |
| #!/usr/bin/env bash | |
| VERSION=4.0.1 | |
| SCRIPT=`basename "$0"` | |
| APPNAME="My App" | |
| APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns" | |
| OSX_VERSION=`sw_vers -productVersion` | |
| PWD=`pwd` | |
| function usage { |