scoop install azure-cli
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
# --- Setup so tools from github release ---------- | |
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine | |
# --- 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 |
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
#! /bin/bash | |
# Using gh cli | |
# check tool requirement | |
if [[ -z $(command -v gh) ]] | |
then | |
echo "Github CLI tool (gh) needs to be installed. See https://cli.github.com/" | |
exit 1 | |
fi |
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
* Set `lang-out` to the language to ignore | |
* Use the LUA filter to remove the element mark with the language | |
``` | |
quarto pandoc --to markdown -L lang-out.lua test.qmd | |
``` |
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
# Get organization name from parent directory | |
$orgName = Split-Path -Path $PSScriptRoot -Leaf | |
# Prompt user for confirmation | |
$confirmation = Read-Host -Prompt "Do you want to update repositories for organization '$orgName'? (y/n)" | |
if ($confirmation -ne 'y') { | |
Write-Output "Operation cancelled by user" | |
exit 0 | |
} | |
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
<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) |
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
$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 |
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
#! /bin/bash | |
# Using new API https://dailies.rstudio.com/json-api/ | |
url=$(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.server.platforms.bionic.link') | |
wget $url | |
sudo dpkg -i $(basename $url) | |
rm $(basename $url) |