This file contains 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
# log-to-sym.ps1 v2 | |
# https://gist.github.com/nanaian/8e2faf8909d15ad393b0802c7aa60bf7 | |
# | |
# compile.log to Project 64 symbols file script | |
# by alex (imalex.xyz) | |
# | |
# usage: | |
# place this script in the $mod/logs directory | |
# compile with Star Rod as usual | |
# run this script (`.\log-to-sym.ps1` in PowerShell) and a PAPER MARIO.sym file will be produced |
This file contains 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
New-Item -ItemType Directory -Force -Path "$HOME\.starpkg" | |
Invoke-WebRequest -Uri "https://github.com/nanaian/starpkg/releases/latest/download/starpkg-x86_64-pc-windows-msvc.zip" -OutFile "~\Downloads\starpkg.zip" | |
Expand-Archive -Force -Path "~\Downloads\starpkg.zip" -DestinationPath "$HOME\.starpkg" | |
Remove-Item "~\Downloads\starpkg.zip" | |
$path = [Environment]::GetEnvironmentVariable("Path", "User") | |
if ($path -notlike "*$HOME\.starpkg*") { | |
[Environment]::SetEnvironmentVariable("Path", "$HOME\.starpkg;" + $path, "User") |
This file contains 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
const markImage = mrk({ | |
extendPatterns: { | |
image: ({ read, readUntil }, meta) => { | |
if (read(2) !== '![') return | |
// All characters up to `]` are the alt text | |
const alt = readUntil(']') | |
if (read(2) !== '](') return |
This file contains 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
const markStrikethrough = mrk({ | |
extendPatterns: { | |
strikethroughStart: ({ read, has }) => { | |
// If this function returns a truthy value, it will be parsed as a strikethroughStart token | |
// See mrk.js for how `read` and `has` work, plus other functions you get access to. | |
return read(2) === '~~' // Next 2 characters should be `~~` | |
&& !has('strikethroughStart', 'strikethroughEnd') // Not already strikethrough! | |
}, |