Skip to content

Instantly share code, notes, and snippets.

View Alistair1231's full-sized avatar

Alistair1231 Alistair1231

View GitHub Profile
@0atman
0atman / configuration.nix
Last active July 26, 2024 17:46
A rebuild script that commits on a successful build
{
config,
pkgs,
options,
...
}: let
hostname = "oatman-pc"; # to alllow per-machine config
in {
networking.hostName = hostname;
@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 / 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 / deck.adoc
Last active January 19, 2023 16:36
LoR Decks

Decks

Table of Contents

Gwen/Katarina

CEDAGBQFBQIBYAIFAUFQCAQDBEAQCBJRAEAQGNYBAUBQ6BADAYCQ2DRAAEAQKKACAEBSULQBAQBRMAICAECQGNI
@Alistair1231
Alistair1231 / _settings_pic.md
Created October 13, 2022 19:57
Use both inputs on Behringer UM2
  • install voicemeeter banana

  • Driver from here or here

    • uninstall asio4all driver
    • plug device in while installing for it to work. If it is already plugged in the setup might time out.
  • Settings in Voicemeeter for having one virtual input for voice only and one for having both inputs https://i.imgur.com/WLZqjmz.png

@Alistair1231
Alistair1231 / download.ps1
Last active August 25, 2022 22:11
yt-dlp (Youtube-dl) download music playlist
yt-dlp 'https://www.youtube.com/playlist?list=PLXkGLqXZchysA87AHg0fYOZTLEHBZsMuT' `
-I 1:200 <# only download index 1 - 200 #> `
-o "%(playlist_count+1-playlist_index)d - %(uploader)s - %(title)s.%(ext)s" <# name is "index (reverse) - uploader - title" #> `
--embed-thumbnail <# needs atomicparsley to be installed #> `
-S "abr:192" <# yt-dlp only!, best audio that has at max 192kbit/s #> `
-f "ba" <# format with best audio #> `
-x <# audio only #> `
--audio-format mp3 <# needs ffmpeg installed #> `
--download-archive ./archive.txt <# only download files that weren't already downloaded #> `
--restrict-filenames <# only ascii characters in filename #>
@Alistair1231
Alistair1231 / lostArk-anti-afk.ahk
Last active June 13, 2022 04:05
Lost Ark Anti AFK kick script | click out of the game for it to work!
#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
; icon file download
; https://mir.cr/N9HJXVGH
I_Icon = antiafk.ico
ICON [I_Icon] ;Changes a compiled script's icon (.exe)
if I_Icon <>