Skip to content

Instantly share code, notes, and snippets.

View Alistair1231's full-sized avatar

Alistair1231 Alistair1231

View GitHub Profile
@Alistair1231
Alistair1231 / scrcpy.sh
Last active July 5, 2024 12:28
twitch scrcpy script
DEVICE=$(adb devices | sed -n '2 p' | cut -f 1)
# set window title
echo -en "\033]0;SCRCPY\007"
adb -s $DEVICE shell wm size 1080x1920
# stop twitch from avoiding cutout
adb -s $DEVICE shell cmd overlay enable com.android.internal.display.cutout.emulation.noCutout
adb -s $DEVICE shell cmd overlay enable com.android.internal.display.cutout.emulation.corner
# if device is ip then use 2M bitrate and 200 buffer
if [[ $DEVICE == *:* ]];then
@Alistair1231
Alistair1231 / whatLevel.ipynb
Created June 15, 2024 20:03
Minecraft, JustEnoughResources / Region Scanner: Parse world-gen file and draw graph of where to find ores
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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