This file contains hidden or 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
# iex (iwr 'https://gist.githubusercontent.com/anonhostpi/e33c2fb4e3282ff75962cf12a2a9af6a/raw/wasm.ps1').content | |
& { | |
# Install-Package "Wasmtime" -ProviderName NuGet | |
$package = Get-Package -Name "Wasmtime" | |
$directory = $package.Source | Split-Path | |
$runtime = "win-x64" # "win/linux/osx-arm64/x64" |
This file contains hidden or 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
# $init = path/to/cloud-init.yaml | |
# # (iwr "https://gist.githubusercontent.com/anonhostpi/05aa300aa56a3b1baf19561b3bc607f5/raw/cloud-init.yaml").Content | Out-File $init | |
# | |
# multipass launch --name archive-wasm --memory 6G --disk 20G --cloud-init $init --network "<your-network-adapter>" | |
# multipass mount "$(Resolve-Path . <# or wherever #>)" archive-wasm:/home/ubuntu/shared | |
# multipass stop archive-wasm | |
# multipass start archive-wasm | |
# multipass shell archive-wasm | |
# | |
# # Inside the VM: |
This file contains hidden or 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
# iex (iwr 'https://gist.githubusercontent.com/anonhostpi/c82d294d7999d875c820e3b2094998e9/raw/wasm.ps1').Content | |
$engine = & { | |
$package = "Wasmtime" | |
$runtime = & (nmo {iex "using namespace System.Runtime.InteropServices" }) { | |
$runtime = @{} | |
$is = { param([OSPlatform] $platform); return ([RuntimeInformation]::IsOSPlatform($platform)) } |
This file contains hidden or 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
# iex (iwr "https://gist.githubusercontent.com/anonhostpi/1cc0084b959a9ea9e97dca9dce414e1f/raw/webserver.ps1").Content | |
function New-Webserver { | |
param( | |
[string] $Binding = "http://localhost:8080/", | |
[string] $BaseDirectory = "$(Get-Location -PSProvider FileSystem)", | |
[string] $Name = "PowerShell Web Server", | |
[System.Collections.IDictionary] $Routes = @{ | |
Before = { param( $Server, $Command, $Listener, $Context ) return $true } |
This file contains hidden or 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
0 TOP SHELL, NO. 3 Ø4,85 (Needs Work) | |
0 Name: 11112.dat | |
0 Author: <AuthorRealName> [<AuthorLDrawName>] | |
0 !LDRAW_ORG Unofficial_Part | |
0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt | |
0 BFC CERTIFY CCW | |
0 !HISTORY 2013-08-14 {LEGO Digital Designer} Original part shape | |
0 !HISTORY 2013-08-14 [<AuthorLDrawName>] File preparation for LDraw Parts Tracker |
This file contains hidden or 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
# See https://github.com/IronLanguages/ironpython3/pull/1957#discussion_r2187237475 | |
& { | |
$ironpython = 'https://raw.githubusercontent.com/IronLanguages/ironpython3/main/eng/scripts/Install-IronPython.ps1' | |
$returns = @{ path = "$env:TEMP\$([guid]::NewGuid().ToString())" } | |
& { | |
"Installing IronPython to temp ('$($returns.path)')..." | |
& ([scriptblock]::Create((iwr ` |
This file contains hidden or 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
$url = 'https://raw.githubusercontent.com/anonhostpi/ironpython3/iex-web-support/eng/scripts/Install-IronPython.ps1' | |
iex ((New-Object System.Net.WebClient).DownloadString($url)) | |
Import-Module ".\IronPython.dll" | |
& { | |
[IronPython.Hosting.Python]::CreateEngine(). | |
CreateScriptSourceFromString("print('Hello from embedded IronPython!')"). | |
Execute() | |
} |
This file contains hidden or 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
meta: | |
id: geom | |
file-extension: geom | |
endian: le | |
imports: | |
- path/to/mtnf.ksy | |
seq: | |
- id: header | |
type: header | |
- id: shader |
This file contains hidden or 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
/* | |
async functions and promises can be a bit misleading, as they are not guaranteed to be executed asynchronously. | |
The way these work is by deferring the execution of a portion of the code to another tick of the event loop. | |
For async functions, the code is executed synchronously until the first await statement, | |
at which point the function is suspended and the rest of the code is executed | |
asynchronously on another tick when the awaited promise is resolved. | |
For promises, the executor function is executed immediately, but in | |
which tick the promise is resolved can be more granularly controlled. |
This file contains hidden or 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
# Install-Module Import-Package | |
# Install-Module New-ThreadController | |
Write-Host "Preparing Test Environment:" | |
Write-Host " - Imports:" | |
Write-Host " - Import-Package: " -NoNewline | |
Try { | |
Import-Module "Import-Package" | |
Write-Host " " -NoNewline |
NewerOlder