macOS install itself is quite easy using OSX-KVM scripts
igpu setup is quite easy by following instructions on Arch Linux wiki
macOS install itself is quite easy using OSX-KVM scripts
igpu setup is quite easy by following instructions on Arch Linux wiki
| # Version: 1.0.2-use-oci-config | |
| # Usage: | |
| # oci-curl <host> <method> [file-to-send-as-body] <request-target> [extra-curl-args] | |
| # | |
| # ex: | |
| # oci-curl iaas.us-ashburn-1.oraclecloud.com get "/20160918/instances?compartmentId=some-compartment-ocid" | |
| # oci-curl iaas.us-ashburn-1.oraclecloud.com post ./request.json "/20160918/vcns" | |
| function oci-curl { |
| // Notes: we need the `sourceTabUrl &&` before the URL check because chromebooks make weird requests that don't come from "real" tabs. | |
| let accessHeaders = new Map(); | |
| let tabIdToUrlMap = new Map(); | |
| let requestListener = function (details) { | |
| const accessControlRequestHeader = details.requestHeaders.find(elem => elem.name.toLowerCase() === "access-control-request-headers"); | |
| if(accessControlRequestHeader) { | |
| accessHeaders.set(details.requestId, accessControlRequestHeader.value); | |
| } |
| /*<!-- Copyright (c) 2018 Gordon Williams. See the file LICENSE for copying permission. --> | |
| */ | |
| // | |
| // based on https://github.com/espruino/EspruinoDocs/blob/master/examples/Morphing%20Clock.js */ | |
| // | |
| // Made more size independent | |
| // | |
| /* Get array of lines from digit d to d+1. | |
| n is the amount (0..1) |
| function wrapInstance(g, args) { | |
| var width = g.getWidth(); | |
| var height = g.getHeight(); | |
| var page = `<script> | |
| var ws; | |
| setTimeout(function(){ | |
| ws = new WebSocket("ws://" + location.host + "/webGraphics", "protocolOne"); | |
| ws.onmessage = function (event) { | |
| if (event.data.length > 40) { | |
| // base64 -> Uint8Array |
| function init(hostname, ip) { | |
| const dgram = require('dgram'); | |
| const srv = dgram.createSocket({ type: 'udp4', reuseAddr: true, recvBufferSize: 2000 }); | |
| srv.addMembership('224.0.0.251', ip); // Bounjour link-local multicast IP | |
| const socket = srv.bind(5353, function(bound) { | |
| function onDatagram(msg, rinfo) { | |
| //console.log('>MEM', JSON.stringify(process.memory())); | |
| //console.log('MSG', msg.length, rinfo.address, rinfo.port); | |
| try { |
| if (typeof console === 'undefined') { | |
| // also see | |
| // | |
| // https://blogs.oracle.com/nashorn/entry/setinterval_and_settimeout_javascript_functions | |
| // https://gist.github.com/kayhadrin/4bf141103420b79126e434dfcf6d4826 | |
| // | |
| // https://avatar-js.java.net/index.html | |
| // https://java.net/projects/avatar-js/sources | |
| var console = {}; |
| <link rel="import" href="../paper-input/paper-input.html"> | |
| <link rel="import" href="../google-map/google-map.html"> | |
| <link rel="import" href="../google-map/google-map-search.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; |
| if (!sinon._originalUseFakeTimers) { | |
| sinon._originalUseFakeTimers = sinon.useFakeTimers; | |
| sinon.useFakeTimers = function() { | |
| // make sure we don't override window.Date used in | |
| // Backburner.setTimeout() to optimize window.setTimeout() call numbers | |
| return sinon._originalUseFakeTimers.apply(this, [new Date().getTime(), "setTimeout", "setInterval", "clearTimeout", "clearInterval"]); | |
| }; | |
| sinon._originalTest = sinon.test; | |
| sinon.test = function(callback) { |
| + Em.Logger.assert = function myAssert(test, message) { | |
| + if (!test) { | |
| + try { | |
| + throw new Error(message); | |
| + } catch(e) { | |
| + console.log('ASSERT LOG: '+e.message+e.trace); | |
| + } finally { | |
| + console.trace('ASSERT: '+message); | |
| + console.assert(test, 'ASSERT: '+message); |