Consider the following straightforward mutable queue implementation using two stacks:
type 'a adt_queue = {
mutable head : 'a head;
mutable tail : 'a tail;
}
module C : sig | |
type t | |
val empty : t | |
val one : char -> t | |
val union : t -> t -> t | |
val inter : t -> t -> t | |
val top : t | |
val mem : char -> t -> bool | |
val make : (char -> bool) -> t | |
val equal : t -> t -> bool |
Apple runs a fleet of stratum 1 NTP servers at time.apple.com. In my experience, ntpd/chronyd are very happy with them.
It looks like, instead of doing anycast, they maybe use DNS to steer you to the closest one.
time.apple.com
is a CNAME for time-osx.g.aaplimg.com
. Querying a handful of DNS servers, I've identified the following locations:
IP | Hostname | Location |
---|---|---|
17.253.2.125 | usdal4-ntp-001.aaplimg.com. | Dallas |
function run(input, parameters) { | |
const appNames = []; | |
const skipAppNames = []; | |
const verbose = true; | |
const scriptName = 'close_notifications_applescript'; | |
const CLEAR_ALL_ACTION = 'Clear All'; | |
const CLEAR_ALL_ACTION_TOP = 'Clear'; | |
const CLOSE_ACTION = 'Close'; |
You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.
Chances are you already have the git credential-osxkeychain
command installed.
If not, just install Git with brew: brew install git
.
Once installed, just tell Git to use the KeyChain to store your credentials:
git config --global credential.helper osxkeychain
This gist has moved to a proper git repo so people can make pull requests: https://github.com/Zenexer/internet-reference/blob/main/Mac%20Keyboard%20Symbols.md
import static java.lang.System.*; | |
import java.util.function.BiFunction; | |
import java.util.function.Function; | |
// Implementation of a pseudo-GADT in Java, translating the examples from | |
// http://www.cs.ox.ac.uk/ralf.hinze/publications/With.pdf | |
// The technique presented below is, in fact, just an encoding of a normal Algebraic Data Type | |
// using a variation of the visitor pattern + the application of the Yoneda lemma to make it | |
// isomorphic to the targeted 'GADT'. |