Enroll macOS Beta Seed without profile installation
$ sudo /System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil
usage: seedutil enroll SEED_PROGRAM
seedutil unenroll
seedutil current
import {LitElement, html} from '@polymer/lit-element'; | |
import {UseEffectMixin} from './use-effect.js'; | |
class MyElement extends UseEffectMixin(LitElement) { | |
static get properties() { | |
return { | |
mood: {type: String}, | |
expression: {type: String} | |
} | |
} |
const createLogger = (backgroundColor, color) => { | |
const logger = (message, ...args) => { | |
if (logger.enabled === false) { | |
return; | |
} | |
console.groupCollapsed( | |
`%c${message}`, | |
`background-color: ${backgroundColor}; color: ${color}; padding: 2px 4px;`, | |
...args |
function Mutilator(data, name, context) { | |
this.n = name || `mutilation-${+new Date()}`; | |
this.d = data; | |
this.c = context || window; | |
this.isArr = function(p) { | |
return this.d[p].constructor == Array; | |
}; | |
this.dispatch = function(p, v, t) { | |
this.c.dispatchEvent( | |
new CustomEvent(this.n, { |
const trackTime = timing => { | |
const now = performance.now(); | |
if (!timing.startTime) timing.startTime = now; | |
const elapsed = now - timing.startTime; | |
const {duration} = timing; | |
if (duration != null && duration <= elapsed) timing.startTime = null; | |
return elapsed; | |
}; | |
const delay = (callback, duration) => { |
#!/usr/bin/env node | |
console.log('yay gist') |
const isIE = () => { | |
const style = document.documentElement.style; | |
return (('msScrollLimit' in style || 'behavior' in style) && !('webkitFlex' in style)); | |
}; |
function isPromise(object){ | |
if(Promise && Promise.resolve){ | |
return Promise.resolve(object) == object; | |
}else{ | |
throw "Promise not supported in your environment" | |
} | |
} | |
var i = 1; | |
var p = new Promise(function(resolve,reject){ |
log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h |