Sponsor on GitHub to get access to this POC
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/sh | |
apptron app indicator - ./icon.png <<MENU | | |
Timers | |
5 seconds | |
10 seconds | |
30 seconds | |
Say Hello | |
--- | |
Quit | |
MENU |
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
function dateTimeFormat(timestamp, locale, str, ...opts) { | |
const d = new Date(timestamp); | |
return str.replace(/{(\d+)}/g, function(match, number) { | |
return typeof opts[number] != 'undefined' | |
? new Intl.DateTimeFormat(locale, opts[number]).format(d) | |
: match; | |
}); | |
} | |
console.log(dateTimeFormat("2021-11-19T19:19:36.598071-06:00", "en", "{0} at {1}!", {dateStyle:"short"}, {timeStyle:"long"})) |
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
// styling module provides a helper for building style | |
// and class attributes for elements. | |
type Styling = string | Object | Style | (() => boolean); | |
type ConditionedStyle = [string, () => boolean]; | |
export function from(...styling: Styling[]): Style { | |
return Style.from(...styling); | |
} |
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
package cli | |
import ( | |
"bytes" | |
"context" | |
"flag" | |
"fmt" | |
"os" | |
"reflect" | |
"strings" |
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
// server.go | |
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"strings" | |
"github.com/progrium/qtalk-go/codec" |
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
// client.go | |
package main | |
import ( | |
"context" | |
"log" | |
"github.com/progrium/qtalk-go/codec" | |
"github.com/progrium/qtalk-go/fn" | |
"github.com/progrium/qtalk-go/talk" |
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
package main | |
import ( | |
"fmt" | |
"github.com/.../fds" | |
"github.com/.../fds/dict" | |
"github.com/.../fds/list" | |
"github.com/.../fds/tree" | |
) |
- In general, binaries built just for x86 architecture will automatically be run in x86 mode
- You can force apps in Rosetta 2 / x86 mode by right-clicking app, click Get Info, check "Open using Rosetta"
- You can force command-line apps by prefixing with
arch -x86_64
, for examplearch -x86_64 go
- Running a shell in this mode means you don't have to prefix commands:
arch -x86_64 zsh
thengo
or whatever - Don't just immediately install Homebrew as usual. It should most likely be installed in x86 mode.
Not all toolchains and libraries properly support M1 arm64 chips just yet. Although
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
NewerOlder