Skip to content

Instantly share code, notes, and snippets.

View Alistair1231's full-sized avatar

Alistair1231 Alistair1231

View GitHub Profile
@Alistair1231
Alistair1231 / _moonlight-setup.adoc
Last active May 3, 2024 13:31
Headless Moonlight Streaming PC
:doctype: book
:toc: left
:toclevels: 3
:data-uri:
:icons: font
:source-highlighter: rouge
:source-linenums-option: inline
:icons: font
@Alistair1231
Alistair1231 / crop.ps1
Last active February 22, 2024 16:26
crop video to 16:9 with powershell and ffmpeg
# Check if an argument is provided
if ($args.Count -eq 0) {
Write-Host "No video file provided. Usage: .\script.ps1 [video file]"
exit
}
# Assign the first argument as the input file
$inputFile = $args[0]
# Check if the file exists
@Alistair1231
Alistair1231 / set tcpip port in build props on read only system.md
Last active September 20, 2023 20:20
set tcpip port in build props on read only /system
#################
# in 1st terminal
#################
# enable usb debugging and root debugging, if no root debugging available, root device with e.g. magisk, after change remove root again
adb root
adb shell
# look at `mount` and find the read only system partition
mount -o rw,remount /
# or
FROM ubuntu:22.04
RUN apt update && apt install -y sudo wget gnupg2 git
# Add the makedeb repository and install the package
RUN wget -qO - 'https://proget.makedeb.org/debian-feeds/makedeb.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.makedeb.org/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list
RUN sudo apt update && sudo apt install -y makedeb
# Create the test folder
RUN mkdir /test
@Alistair1231
Alistair1231 / DL_KMS_VL_ALL_AIO.ps1
Last active April 22, 2023 10:55
powershell script to get latest KMS_VL_ALL_AIO version
# ########
# # bash #
# ########
# pattern="KMS_VL_ALL_AIO-.*.7z"
# repo="abbodi1406/KMS_VL_ALL_AIO"
# # remove old files
# rm -f description.txt && rm -f ATLauncher-*.jar
# # get the files
# curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -oP '"browser_download_url":\s*"\K[^"]+' | grep -E "$pattern" | wget -q --show-progress -i -
@Alistair1231
Alistair1231 / get-latest-file.sh
Last active April 22, 2023 10:51
get latest github release using curl on bash (ex. revanced-cli)
# ########
# # bash #
# ########
# pattern="ATLauncher-.*"
# repo="Alistair1231/ATLauncher-Offline"
# # remove old files
# rm -f description.txt && rm -f ATLauncher-*.jar
# # get the files
# curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -oP '"browser_download_url":\s*"\K[^"]+' | grep -E "$pattern" | wget -q --show-progress -i -
@Alistair1231
Alistair1231 / Playnite-Run-And-Close-Program.adoc
Last active March 26, 2023 22:28
Playnite-Run-And-Close-Program

"Normal" App

execute before starting a game
$file1 = Start-Process "python3" "D:\path\file1.py" -Passthru
$file1 | Export-Clixml -Path (Join-Path D:\path 'file1-handle.xml')
@Alistair1231
Alistair1231 / tikz-uml.md
Last active March 17, 2023 10:40 — forked from zorgick/tikz-uml.md
How to install tikz-uml package on different platforms
@Alistair1231
Alistair1231 / ssh-copy-id.ps1
Last active September 6, 2023 17:57
ssh-copy-id windows
# just copy/paste into powershell and edit variables before pressing enter.
$user="user"; `
$server="example.com"; `
$port=22; `
$file="id_rsa"; `
type $env:USERPROFILE\.ssh\$file.pub | ssh $user@$server -p $port "mkdir -p ~/.ssh && cat >> .ssh/authorized_keys"
@Alistair1231
Alistair1231 / ffmpeg-normalize.adoc
Created January 21, 2023 19:14
ffmpeg-normalize

‎‎​