As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to
Discover gists
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
@font-face { | |
font-family: 'fontello'; | |
src: url('../font/fontello.eot?14391850'); | |
src: url('../font/fontello.woff?14391850') format('woff'), | |
url('../font/fontello.ttf?14391850') format('truetype'), | |
url('../font/fontello.svg?14391850#fontello') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
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
new Vue({ | |
el: '#app', | |
methods: { | |
validate() { | |
VueValidator(this, () => { | |
console.log('single input is valid'); | |
}); | |
} | |
} | |
}) |
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
$white_foo_bar: #FFF; | |
$map: ( | |
foo: 'foo', | |
bar: 'bar', | |
baz: 'white', | |
foowhite: 'foowhitecolor' | |
); | |
@mixin foo($type) { |
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
//import the selenium web driver | |
var webdriver = require('selenium-webdriver'); | |
var chromeCapabilities = webdriver.Capabilities.chrome(); | |
//setting chrome options to start the browser fully maximized | |
var chromeOptions = { | |
'args': ['--test-type', '--start-maximized'] | |
}; | |
chromeCapabilities.set('chromeOptions', chromeOptions); | |
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build(); |
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
//import the selenium web driver | |
var webdriver = require('selenium-webdriver'); | |
var chromeCapabilities = webdriver.Capabilities.chrome(); | |
//setting chrome options to start the browser fully maximized | |
var chromeOptions = { | |
'args': ['--test-type', '--start-maximized'] | |
}; | |
chromeCapabilities.set('chromeOptions', chromeOptions); | |
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build(); |
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
AR.json: "validation_regex": "([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?" | |
AR.json: "validation_regex": "([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?" | |
BE.json: "validation_regex": "[1-9]\\d{3}" | |
BE.json: "validation_regex": "[1-9]\\d{3}" | |
BN.json: "validation_regex": "[A-Z]{2}[ ]?\\d{4}" | |
BN.json: "validation_regex": "[A-Z]{2}[ ]?\\d{4}" | |
BR.json: "validation_regex": "\\d{5}[\\s\\-]?\\d{3}" | |
BR.json: "validation_regex": "\\d{5}[\\-]?\\d{3}" | |
CA.json: "validation_regex": "[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ ]?\\d[ABCEGHJ-NPRSTV-Z]\\d" | |
CA.json: "validation_regex": "[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ ]?\\d[ABCEGHJ-NPRSTV-Z]\\d" |
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
const object = {a: 1, b: 2} | |
const array = [3,4] | |
// Value expression | |
const foo = {...object, c: 3} // == {a: 1, b: 2, c: 3} | |
const bar = [...array, 5, 6] // == [3, 4, 5, 6] | |
// Destructuring assignment | |
{ | |
const {a, ...rest} = foo // a == {a: 1}; rest == {b: 2, c: 3} |
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
// Disable mobile zoom on focus | |
{ | |
// Customise the selector value as necessary | |
const selector = '[data-nozoom]' | |
const $viewport = | |
document.querySelector('meta[name=viewport]') | |
?? | |
Object.assign(document.createElement('meta'), {name: 'viewport'}) | |
const $scale0 = Object.assign($viewport.cloneNode(), {content: 'user-scalable=0'}) |
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
import {ordinals, defaultRange, rangeFromOrdinal, Calendar} from './DateRange.js' | |
const state = { | |
...rangeFromOrdinal('Today'), | |
showCalendar : false, | |
} | |
m.mount(document.body, { | |
view: () => [ | |
m('form', |
NewerOlder