The gist is:
- install the normal python from python.org
- install everything into a venv
- copy the venv into python embed.
unzip python-3.8.0-embed-amd64.zip
# NB this depends on devcon. you must install it from chocolatey with choco install -y devcon.portable | |
$devcon = "$ENV:ProgramData\Chocolatey\Lib\devcon.portable\Devcon$(if ($ENV:PROCESSOR_ARCHITECTURE -like '*64') {'64'} else {'32'}).exe" | |
Get-NetAdapter ` | |
| Where-Object {$_.Virtual} ` | |
| Where-Object {$_.DriverFileName -like 'VBox*.sys'} ` | |
| ForEach-Object { | |
Write-Host "Removing the $($_.InterfaceAlias) interface..." | |
$result = &$devcon remove "@$($_.PnPDeviceID)" |
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
package main | |
import ( | |
"context" | |
"flag" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"time" |
// +build windows | |
package screen | |
import ( | |
"fmt" | |
"image" | |
"reflect" | |
"syscall" | |
"unsafe" |
This will show how to run an emulated arm64 virtual machine under qemu.
It first shows how to launch a typical amd64 virtual machine to make sure we have cloud-init working.
Then it shows how to launch the arm64 (aka aarch64) virtual machine.
NB In my humble i3-3245 amd64 host this is way too slow to run anything useful as it takes about 6m to allow you to finally login, and after that, its slow too. You are really better off with a proper physical arm64 machine, like:
import json | |
import requests | |
import urllib3 | |
api_url = 'https://192.168.1.21:8006/api2/json' | |
username = 'root@pam' | |
password = 'PASSWORD' | |
node = 'pve' | |
vm_id = 105 |
Start QEMU with QMP UNIX socket and connect:
qemu-system-x86_64 -qmp unix:test.socket,server,nowait ...
nc -U test.socket
qmp-shell test.socket # use the raw qmp interface. see https://github.com/0xef53/qmp-shell
qmp-shell -H test.socket # use the human interface. see https://github.com/0xef53/qmp-shell
// see https://books.sonatype.com/nexus-book/3.0/reference/scripting.html | |
// see https://github.com/sonatype/nexus-book-examples/tree/nexus-3.0.x/scripting/nexus-script-example | |
import groovy.json.JsonOutput | |
import org.sonatype.nexus.security.user.UserSearchCriteria | |
import org.sonatype.nexus.security.authc.apikey.ApiKeyStore | |
import org.sonatype.nexus.security.realm.RealmManager | |
import org.apache.shiro.subject.SimplePrincipalCollection | |
import org.sonatype.nexus.scheduling.TaskScheduler | |
import org.sonatype.nexus.scheduling.schedule.Daily |
// scrape https://uupdump.net/known.php?q=feature+update+server+operating+system+20348+amd64 | |
// NB there's a better way, using the API, e.g. https://api.uupdump.net/listid.php?search=feature+update+server+operating+system+20348+amd64 | |
// see https://github.com/uup-dump/json-api | |
// see https://github.com/uup-dump/website/blob/master/known.php | |
// see https://github.com/uup-dump/website/blob/master/get.php | |
// each scraped line is a tab separated string with 4 fields alike: | |
// "Feature update to Microsoft server operating system, version 21H2 (20348.643) amd64\tx64\t2022-04-12 17:04:01 UTC\tb8e204fd-4e2b-4722-95d7-aad633ad7379" | |
const updateIdEl = Array.prototype.find.call(document.querySelectorAll('th'), el => el.innerText == "Update ID"); | |
const buildsTableEl = updateIdEl.parentElement.parentElement.parentElement; | |
const builds = buildsTableEl.querySelector('tbody').innerText |