AZURE VM notes
Install azure CLI
Scoop
scoop install azure-cli
function Switch-Path { | |
param() | |
$paths=$([Environment]::GetEnvironmentVariable('Path','User') -Split ";") | |
$dev = $paths | Select-String -SimpleMatch "quarto-cli\package\dist\bin" | |
$rel = $paths | Select-String -SimpleMatch "scoop\shims" | |
# --- Setup so tools from github release ---------- | |
# --- Tools ----- | |
function Get-GithubLatestRelease { | |
param ( | |
[parameter(Mandatory)][string]$project, # e.g. paintdotnet/release | |
[parameter(Mandatory)][string]$pattern, # regex. e.g. install.x64.zip | |
[switch]$prerelease |
#! /bin/bash | |
# Using gh cli | |
gh --repo jgm/pandoc release download --pattern '*amd64.deb' | |
sudo dpkg -i $(ls pandoc-*.deb) | |
rm $(ls pandoc-*.deb) |
* Set `lang-out` to the language to ignore | |
* Use the LUA filter to remove the element mark with the languae | |
``` | |
quarto pandoc --to markdown -L lang-out.lua test.qmd | |
``` |
$repos = gh repo list 'quarto-journals' --no-archived --source --json owner,name,defaultBranchRef -q '.[] | {org: .owner.login, repo: .name, branch: .defaultBranchRef.name}' | ConvertFrom-Json | |
foreach($row in $repos) { | |
echo "Looking for $($row.repo) folder" | |
if (Test-Path -Path $row.repo) { | |
git -C "$($row.repo)" checkout $row.branch | |
git -C "$($row.repo)" pull origin $row.branch | |
} else { | |
gh repo clone "$($row.org)/$($row.repo)" |
scoop install azure-cli
<script type="text/javascript"> | |
Reveal.on('slidechanged', event => { | |
getNodes = function(slide) { | |
var level1 = slide.querySelectorAll(":scope > *") | |
childs = [] | |
for (let e of level1) { | |
if (e.nodeName === "DIV" && e.className.includes('cell')) { | |
var level2 = e.querySelectorAll(":scope > *:not(div.cell-output)") | |
childs.push(...level2) |
$wc = [System.Net.WebClient]::new() | |
$pkgurl = $(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.desktop.platforms[\"windows-xcopy\"].link') | |
$pkgurl | |
$publishedHash = $(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.desktop.platforms[\"windows-xcopy\"].sha256') | |
$publishedHash | |
$FileHash = Get-FileHash -InputStream ($wc.OpenRead($pkgurl)) | |
$FileHash.Hash -eq $publishedHash | |
$FileHash.Hash | |
$publishedHash |
Download the scripts
get_gist <- function(where = "revdep/tools") {
gist_id <- "7018c926b14ec45d1a34e70e018db2d5"
fs::dir_create(where)