In Github, link to this part is https://gist.github.com/cderv/84a7f00b5de2f7c09c1005b4c75751d1#with-ending-dot without dot at the end
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 | |
| gh --repo jgm/pandoc release download --pattern '*amd64.deb' | |
| sudo dpkg -i $(ls pandoc-*.deb) | |
| rm $(ls pandoc-*.deb) |
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
| 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" | |
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 | |
| # Install Pandoc on Linux using gh cli | |
| # | |
| # Usage: | |
| # ./update-pandoc.sh # Install latest stable release | |
| # ./update-pandoc.sh 3.8.3 # Install specific version | |
| # ./update-pandoc.sh --nightly # Download latest nightly build | |
| # check tool requirement |
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 |