Compare commits
21 Commits
f5abc5a54b
...
master
Author | SHA1 | Date | |
---|---|---|---|
5b3c01607d | |||
c11cf9202f | |||
4a7a367547 | |||
0085d4dee2 | |||
d3648342e5 | |||
642edffcfe | |||
b449ded8fe | |||
93a2d7e329 | |||
7be7397ab1 | |||
e66fdf942a | |||
d2c5e8cdb9 | |||
fc62233d3f | |||
5caeecb0e7 | |||
271c4bfc92 | |||
7d90433a9a | |||
30f67ab42b | |||
2acd572e8e | |||
e4c6e42efb | |||
ca5302f42f | |||
3b40a9d62f | |||
71c14465b2 |
10
JavaScripts/HelloWorld
Executable file
10
JavaScripts/HelloWorld
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/env -S java --source 11
|
||||
|
||||
class Main {
|
||||
public static void main(String args[]) {
|
||||
System.out.println("HelloWorld!");
|
||||
|
||||
// Print the sum of 1 and 2
|
||||
System.out.println(1 + 2);
|
||||
}
|
||||
}
|
66
ObsidianUpdateChecker/main.py
Normal file
66
ObsidianUpdateChecker/main.py
Normal file
@ -0,0 +1,66 @@
|
||||
# Import json parsing and urllib
|
||||
import json
|
||||
import urllib.request
|
||||
# Import subprocess for running dpkg
|
||||
import subprocess
|
||||
|
||||
# Endpoint for the latest release
|
||||
API_URL = "https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest"
|
||||
|
||||
# DEB file name, will be filled in later
|
||||
DEB_NAME = ""
|
||||
# URL for the latest deb file, will be filled in later
|
||||
DEB_URL = ""
|
||||
# Version number, will be filled in later
|
||||
DEB_VERSION = ""
|
||||
# Installed version number, will be filled in later
|
||||
INSTALLED_VERSION = ""
|
||||
|
||||
# Get the latest release from the API
|
||||
with urllib.request.urlopen(API_URL) as url:
|
||||
data = json.loads(url.read().decode())
|
||||
assets = data["assets"]
|
||||
for asset in assets:
|
||||
if asset["name"].endswith(".deb"):
|
||||
DEB_NAME = asset["name"]
|
||||
DEB_URL = asset["browser_download_url"]
|
||||
|
||||
# Parse the version number from the deb file name
|
||||
# Example: obsidian_0.12.15_amd64.deb -> 0.12.15
|
||||
DEB_VERSION = DEB_NAME.split("_")[1]
|
||||
|
||||
print("Latest version: " + DEB_VERSION)
|
||||
|
||||
# Get the installed version number by parsing the output of dpkg -s obsidian
|
||||
output = subprocess.run(["dpkg", "-s", "obsidian"], capture_output=True)
|
||||
# Parse the output for the version number
|
||||
# Example: Version: 0.12.15
|
||||
for line in output.stdout.decode().split("\n"):
|
||||
if line.startswith("Version:"):
|
||||
INSTALLED_VERSION = line.split(" ")[1]
|
||||
|
||||
print("Installed version: " + INSTALLED_VERSION)
|
||||
|
||||
def semver_check_new(old, new):
|
||||
# Split the version numbers into arrays of numbers
|
||||
old_split = old.split(".")
|
||||
new_split = new.split(".")
|
||||
# Loop through the numbers
|
||||
for i in range(len(old_split)):
|
||||
# If the new version is higher, return true
|
||||
if int(new_split[i]) > int(old_split[i]):
|
||||
return True
|
||||
# If the new version is the same or lower, return false
|
||||
return False
|
||||
|
||||
# Check if the new version is higher than the installed version
|
||||
if semver_check_new(INSTALLED_VERSION, DEB_VERSION):
|
||||
print("New version available!")
|
||||
# Download the deb file
|
||||
urllib.request.urlretrieve(DEB_URL, DEB_NAME)
|
||||
# Install the deb file
|
||||
subprocess.run(["pkexec", "apt", "install", f"./{DEB_NAME}"])
|
||||
# Remove the deb file
|
||||
subprocess.run(["rm", DEB_NAME])
|
||||
else:
|
||||
print("No new version available")
|
122
OpenAsarInjector/main.py
Normal file
122
OpenAsarInjector/main.py
Normal file
@ -0,0 +1,122 @@
|
||||
ASAR = "app.asar"
|
||||
ASAR_BACKUP = ASAR + ".bak"
|
||||
SYMLINK_PATH = ""
|
||||
REAL_PATH = ""
|
||||
DISCORD_FOLDER = ""
|
||||
RESOURCES_PATH = ""
|
||||
|
||||
def root():
|
||||
import os
|
||||
if os.geteuid() != 0:
|
||||
print("Script not running as root")
|
||||
exit()
|
||||
|
||||
def backup():
|
||||
import os
|
||||
# Check for existing backup
|
||||
if os.path.isfile(RESOURCES_PATH + ASAR_BACKUP):
|
||||
print("Backup already exists, openasar is already installed")
|
||||
exit()
|
||||
try:
|
||||
print(RESOURCES_PATH + ASAR)
|
||||
os.rename(RESOURCES_PATH + ASAR, RESOURCES_PATH + ASAR_BACKUP)
|
||||
except Exception as e:
|
||||
print("Couldn't rename file: " + str(e))
|
||||
|
||||
def find():
|
||||
import os
|
||||
from shutil import which
|
||||
|
||||
# Get full path of discord symlink on path
|
||||
global SYMLINK_PATH
|
||||
SYMLINK_PATH = which("discord")
|
||||
# Parse real path of discord symlink
|
||||
global REAL_PATH
|
||||
REAL_PATH = os.path.realpath(SYMLINK_PATH)
|
||||
# Get containing folder
|
||||
global DISCORD_FOLDER
|
||||
DISCORD_FOLDER = os.path.dirname(REAL_PATH)
|
||||
# Add /resources/ to the real path
|
||||
global RESOURCES_PATH
|
||||
RESOURCES_PATH = DISCORD_FOLDER + "/resources/"
|
||||
|
||||
|
||||
def download():
|
||||
import urllib.request
|
||||
import json
|
||||
# Get nightly release from github
|
||||
# url: https://github.com/GooseMod/OpenAsar/
|
||||
# release: https://github.com/GooseMod/OpenAsar/releases/tag/nightly
|
||||
API_URL = "https://api.github.com/repos/GooseMod/OpenAsar/releases/latest"
|
||||
DOWNLOAD_URL = ""
|
||||
|
||||
with urllib.request.urlopen(API_URL) as url:
|
||||
data = json.loads(url.read().decode())
|
||||
DOWNLOAD_URL = data['assets'][0]['browser_download_url']
|
||||
|
||||
# Download the file
|
||||
urllib.request.urlretrieve(DOWNLOAD_URL, RESOURCES_PATH + ASAR)
|
||||
|
||||
def kill():
|
||||
import os
|
||||
import signal
|
||||
import psutil
|
||||
|
||||
# Get discord process
|
||||
for proc in psutil.process_iter():
|
||||
if proc.name() == "Discord":
|
||||
# Kill discord
|
||||
os.kill(proc.pid, signal.SIGTERM)
|
||||
|
||||
def uninstall():
|
||||
import os
|
||||
if os.path.isfile(RESOURCES_PATH + ASAR_BACKUP):
|
||||
try:
|
||||
os.remove(RESOURCES_PATH + ASAR)
|
||||
os.rename(RESOURCES_PATH + ASAR_BACKUP, RESOURCES_PATH + ASAR)
|
||||
except Exception as e:
|
||||
print("Couldn't remove/rename file: " + str(e))
|
||||
else:
|
||||
print("No backup found, openasar is not installed")
|
||||
exit()
|
||||
|
||||
|
||||
# Should check if the package has been updated, as discords asar is much larger
|
||||
def sanity_check():
|
||||
import os
|
||||
# Get file size of asar
|
||||
asar_size = os.path.getsize(RESOURCES_PATH + ASAR)
|
||||
# If the asar is larger than 1MB, discord has probably updated
|
||||
if asar_size > 1000000:
|
||||
print("Discord has probably updated, please clear backups and reinstall")
|
||||
print("Would you like to clear backups? (y/n)")
|
||||
answer = input().lower()
|
||||
if answer == "y":
|
||||
if os.path.isfile(RESOURCES_PATH + ASAR_BACKUP):
|
||||
os.remove(RESOURCES_PATH + ASAR_BACKUP)
|
||||
print("Backup cleared, installation will continue as normal")
|
||||
print("Backups cleared, installation will continue as normal")
|
||||
else:
|
||||
print("Backups not cleared, please clean manually")
|
||||
exit()
|
||||
|
||||
|
||||
def main():
|
||||
import sys
|
||||
root()
|
||||
kill()
|
||||
find()
|
||||
sanity_check()
|
||||
if len(sys.argv) > 1:
|
||||
if sys.argv[1] == "uninstall":
|
||||
uninstall()
|
||||
print("Uninstalled openasar")
|
||||
else:
|
||||
print("Unknown argument")
|
||||
else:
|
||||
backup()
|
||||
download()
|
||||
print("Installed openasar")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -26,7 +26,7 @@ if (Test-Path $location) {
|
||||
Write-Host $newPipConfig
|
||||
|
||||
# Write the new content to the file
|
||||
$newPipConfig | Out-File $location -Force
|
||||
$newPipConfig | Out-File $location -Force -Encoding utf8
|
||||
} else {
|
||||
# If it doesn't exist, create it
|
||||
New-Item -Path $location -ItemType File
|
||||
|
37
Rainbow/rainbow.js
Normal file
37
Rainbow/rainbow.js
Normal file
@ -0,0 +1,37 @@
|
||||
// Approximate racket functions
|
||||
function circle(color) {
|
||||
print(`${color} circle`)
|
||||
}
|
||||
function square(color) {
|
||||
print(`${color} square`)
|
||||
}
|
||||
function print(shape) {
|
||||
console.log(shape)
|
||||
}
|
||||
// Cuz javascript doesn't have functional primitives
|
||||
function first(list) {
|
||||
return list[0]
|
||||
}
|
||||
function rest(list) {
|
||||
return list.slice(1)
|
||||
}
|
||||
|
||||
// Helper to cycle through the functions
|
||||
function cycle(list) {
|
||||
return rest(list).concat(first(list))
|
||||
}
|
||||
|
||||
// The actual function
|
||||
function rainbow(...functions) {
|
||||
let colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']
|
||||
function rainbowRecursive(functions, colors) {
|
||||
if (colors.length === 0) {
|
||||
return
|
||||
}
|
||||
first(functions)(first(colors))
|
||||
rainbowRecursive(cycle(functions), rest(colors))
|
||||
}
|
||||
rainbowRecursive(functions, colors)
|
||||
}
|
||||
|
||||
rainbow(circle, square)
|
17
Rainbow/rainbow.rkt
Normal file
17
Rainbow/rainbow.rkt
Normal file
@ -0,0 +1,17 @@
|
||||
#lang racket
|
||||
(require pict)
|
||||
(require pict/color)
|
||||
; The actual function
|
||||
(define (rainbow . shapes)
|
||||
(define colors (list red orange yellow green blue purple))
|
||||
(define (cycle lst) (append (rest lst) (list (first lst))))
|
||||
(define (rainbow-recursive shapes colors)
|
||||
(cond
|
||||
[(empty? colors) (void)]
|
||||
[(print((first colors) (first shapes)))
|
||||
(rainbow-recursive (cycle shapes) (rest colors))]
|
||||
)
|
||||
)
|
||||
(rainbow-recursive shapes colors))
|
||||
; Example usage
|
||||
(rainbow (filled-rectangle 25 25) (filled-ellipse 25 25))
|
72
RemoveVersion/RemoveVersion.ps1
Normal file
72
RemoveVersion/RemoveVersion.ps1
Normal file
@ -0,0 +1,72 @@
|
||||
# Get each folder in the current directory
|
||||
$folders = Get-ChildItem -Directory
|
||||
|
||||
# Array to store the folders that need to be renamed
|
||||
$work = @()
|
||||
|
||||
foreach ($folder in $folders) {
|
||||
# Find the version number in the folder name
|
||||
$version = $folder.Name -match '(\d+\.\d+\.\d+\.\d+)'
|
||||
if ($version) {
|
||||
# Replace entire folder name with the version number
|
||||
$new_name = $matches[0]
|
||||
|
||||
# if version has a alpha character, remove it, eg 0.1.0a, then re-add it to new name
|
||||
$alpha = $folder.Name -match '(\d+\.\d+\.\d+\.\d+)([a-zA-Z])'
|
||||
if ($alpha) {
|
||||
$new_name = $matches[1]
|
||||
$new_name = $new_name + $matches[2]
|
||||
}
|
||||
$toadd = New-Object PSObject
|
||||
$toadd | Add-Member -MemberType NoteProperty -Name path -Value $folder.FullName
|
||||
$toadd | Add-Member -MemberType NoteProperty -Name newname -Value $new_name
|
||||
$work += $toadd
|
||||
|
||||
Write-Host "Rename $folder to $new_name"
|
||||
continue
|
||||
}
|
||||
# Find the version number in the folder name
|
||||
$version = $folder.Name -match '(\d+\.\d+\.\d+)'
|
||||
if ($version) {
|
||||
# Replace entire folder name with the version number
|
||||
$new_name = $matches[0]
|
||||
|
||||
# if version has a alpha character, remove it, eg 0.1.0a, then re-add it to new name
|
||||
$alpha = $folder.Name -match '(\d+\.\d+\.\d+)([a-zA-Z])'
|
||||
if ($alpha) {
|
||||
$new_name = $matches[1]
|
||||
$new_name = $new_name + $matches[2]
|
||||
}
|
||||
$toadd = New-Object PSObject
|
||||
$toadd | Add-Member -MemberType NoteProperty -Name path -Value $folder.FullName
|
||||
$toadd | Add-Member -MemberType NoteProperty -Name newname -Value $new_name
|
||||
$work += $toadd
|
||||
|
||||
Write-Host "Rename $folder to $new_name"
|
||||
continue
|
||||
}
|
||||
# Find the version number in the folder name
|
||||
$version = $folder.Name -match '(\d+\.\d+)'
|
||||
if ($version) {
|
||||
# Replace entire folder name with the version number
|
||||
$new_name = $matches[0]
|
||||
|
||||
# if version has a alpha character, remove it, eg 0.1.0a, then re-add it to new name
|
||||
$alpha = $folder.Name -match '(\d+\.\d+)([a-zA-Z])'
|
||||
if ($alpha) {
|
||||
$new_name = $matches[1]
|
||||
$new_name = $new_name + $matches[2]
|
||||
}
|
||||
$toadd = New-Object PSObject
|
||||
$toadd | Add-Member -MemberType NoteProperty -Name path -Value $folder.FullName
|
||||
$toadd | Add-Member -MemberType NoteProperty -Name newname -Value $new_name
|
||||
$work += $toadd
|
||||
|
||||
Write-Host "Rename $folder to $new_name"
|
||||
continue
|
||||
}
|
||||
}
|
||||
Read-Host -Prompt "Press Enter to continue"
|
||||
foreach ($item in $work) {
|
||||
Rename-Item -Path $item.path -NewName $item.newname
|
||||
}
|
26
ScoopCompare/ScoopCompare.js
Normal file
26
ScoopCompare/ScoopCompare.js
Normal file
@ -0,0 +1,26 @@
|
||||
// Run with node
|
||||
|
||||
// Read ~/scoop/apps.json and compare it to scoop export
|
||||
// Then display the differences in the installed apps and the apps.json file
|
||||
|
||||
// read apps.json file
|
||||
let fs = require('fs');
|
||||
let apps = fs.readFileSync('C:/Users/Isaac/scoop/apps.json', 'utf8');
|
||||
apps = JSON.parse(apps);
|
||||
apps = apps.apps;
|
||||
|
||||
// run scoop export in shell and save output to variable
|
||||
let { execSync } = require('child_process');
|
||||
let installedApps = execSync('scoop export').toString();
|
||||
installedApps = JSON.parse(installedApps);
|
||||
installedApps = installedApps.apps;
|
||||
|
||||
// Make a set out of each of the arrays on the Name property
|
||||
let appsSet = new Set(apps.map(app => app.Name));
|
||||
let installedAppsSet = new Set(installedApps.map(app => app.Name));
|
||||
|
||||
// Find the difference between the two sets
|
||||
let diffFromInstalledApps = new Set([...appsSet].filter(x => !installedAppsSet.has(x)));
|
||||
let diffFromApps = new Set([...installedAppsSet].filter(x => !appsSet.has(x)));
|
||||
console.log("Apps in apps.json but not installed: ", diffFromInstalledApps);
|
||||
console.log("Apps installed but not in apps.json: ", diffFromApps);
|
71
ScoopManifestReformatter/reformat.ps1
Normal file
71
ScoopManifestReformatter/reformat.ps1
Normal file
@ -0,0 +1,71 @@
|
||||
<#
|
||||
use this order to reformat json objects:
|
||||
version
|
||||
description
|
||||
homepage
|
||||
license
|
||||
notes
|
||||
depends
|
||||
suggest
|
||||
architecture
|
||||
url
|
||||
hash
|
||||
extract_dir
|
||||
extract_to
|
||||
pre_install
|
||||
installer
|
||||
post_install
|
||||
env_add_path
|
||||
env_set
|
||||
bin
|
||||
shortcuts
|
||||
persist
|
||||
pre_uninstall
|
||||
uninstaller
|
||||
post_uninstall
|
||||
checkver
|
||||
autoupdate
|
||||
#>
|
||||
|
||||
# Read all json files in the current directory
|
||||
Get-ChildItem -Filter *.json | ForEach-Object {
|
||||
# Read the file
|
||||
$json = Get-Content $_.FullName | ConvertFrom-Json -Depth 9
|
||||
|
||||
# Create a new object with the properties in the desired order
|
||||
$newJson = [ordered]@{
|
||||
version = $json.version
|
||||
description = $json.description
|
||||
homepage = $json.homepage
|
||||
license = $json.license
|
||||
notes = $json.notes
|
||||
depends = $json.depends
|
||||
suggest = $json.suggest
|
||||
architecture = $json.architecture
|
||||
url = $json.url
|
||||
hash = $json.hash
|
||||
extract_dir = $json.extract_dir
|
||||
extract_to = $json.extract_to
|
||||
pre_install = $json.pre_install
|
||||
installer = $json.installer
|
||||
post_install = $json.post_install
|
||||
env_add_path = $json.env_add_path
|
||||
env_set = $json.env_set
|
||||
bin = $json.bin
|
||||
shortcuts = $json.shortcuts
|
||||
persist = $json.persist
|
||||
pre_uninstall = $json.pre_uninstall
|
||||
uninstaller = $json.uninstaller
|
||||
post_uninstall = $json.post_uninstall
|
||||
checkver = $json.checkver
|
||||
autoupdate = $json.autoupdate
|
||||
}
|
||||
# Remove any null properties
|
||||
$newJson = $newJson | Where-Object { $_.Value -ne $null }
|
||||
|
||||
# Convert the new object back to json and write it back to the file
|
||||
$newJson | ConvertTo-Json -Depth 9 | Set-Content $_.FullName
|
||||
}
|
||||
|
||||
# Run scoop json prettier on all json files in the current directory
|
||||
~/scoop/apps/scoop/current/bin/formatjson.ps1 -Dir .
|
54
ShowTax/showtax.js
Normal file
54
ShowTax/showtax.js
Normal file
@ -0,0 +1,54 @@
|
||||
// ==UserScript==
|
||||
// @name New Userscript
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 2024-04-12
|
||||
// @description try to take over the world!
|
||||
// @author You
|
||||
// @match https://www.amazon.ca/*
|
||||
// @grant none
|
||||
// @run-at document-idle
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
const TAX = 0.15;
|
||||
|
||||
// Todo: decide if it should just round up to the nearest dollar
|
||||
// Todo: fix queryselectorall only finding one element at a time
|
||||
|
||||
const changeNode = function(node) {
|
||||
var wholeNode = node.querySelector('.a-price-whole');
|
||||
var fractionNode = node.querySelector('.a-price-fraction');
|
||||
var whole = wholeNode ? wholeNode.textContent : '0';
|
||||
var fraction = fractionNode ? fractionNode.textContent : '0';
|
||||
whole = parseInt(whole);
|
||||
fraction = parseInt(fraction);
|
||||
whole += whole * TAX;
|
||||
fraction += fraction * TAX;
|
||||
whole = Math.floor(whole);
|
||||
fraction = Math.floor(fraction);
|
||||
if (fraction >= 100) {
|
||||
whole += 1;
|
||||
fraction -= 100;
|
||||
}
|
||||
if (fraction < 10) {
|
||||
fraction = '0' + fraction;
|
||||
}
|
||||
wholeNode.textContent = whole;
|
||||
fractionNode.textContent = fraction;
|
||||
}
|
||||
|
||||
const find = function() {
|
||||
console.log("Finding price nodes");
|
||||
document.querySelectorAll('.a-price').forEach((node) => {
|
||||
if (node.attributes['found']) {
|
||||
return;
|
||||
}
|
||||
node.attributes['found'] = true;
|
||||
console.log(node);
|
||||
console.log("Price node found")
|
||||
changeNode(node);
|
||||
});
|
||||
}
|
||||
//find();
|
||||
setInterval(find, 1000);
|
||||
})();
|
@ -1,16 +1,26 @@
|
||||
param (
|
||||
[int] [alias('p')] $port = 21,
|
||||
[string] [alias('d')] $directory = '.',
|
||||
[bool] [alias('w')] $write = $false
|
||||
)
|
||||
|
||||
$venv = "\.pyftplib"
|
||||
$venv = $HOME + $venv
|
||||
# Create virtual environment
|
||||
if (-not (Test-Path venv)) {
|
||||
virtualenv venv
|
||||
if (-not (Test-Path $venv)) {
|
||||
write-host "Creating virtual environment at $venv"
|
||||
virtualenv "$venv"
|
||||
}
|
||||
|
||||
# Activate virtual environment
|
||||
.\venv\Scripts\activate.ps1
|
||||
. ($venv + "\Scripts\Activate.ps1")
|
||||
|
||||
# Install dependencies
|
||||
pip install pyftpdlib
|
||||
|
||||
# Run FTP server
|
||||
python -m pyftpdlib
|
||||
|
||||
# Not working for streaming video files
|
||||
# twistd -n ftp -r .
|
||||
if ($write) {
|
||||
python -m pyftpdlib -p $port -d $directory -w
|
||||
} else {
|
||||
python -m pyftpdlib -p $port -d $directory
|
||||
}
|
20
SteamToggleUpdate/ToggleFallout4Updates.ps1
Normal file
20
SteamToggleUpdate/ToggleFallout4Updates.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
$appId = 377160
|
||||
$networkLocation = "https://raw.githubusercontent.com/IsaacShoebottom/Scripts/master/SteamToggleUpdate/ToggleUpdates.ps1"
|
||||
|
||||
# Test if ToggleUpdates.ps1 exists and invoke it if it does
|
||||
If (Test-Path -Path ".\ToggleUpdates.ps1" -PathType Leaf) {
|
||||
.\ToggleUpdates.ps1 $appId
|
||||
}
|
||||
Else {
|
||||
# construct temp path
|
||||
$env:temp = [System.IO.Path]::GetTempPath()
|
||||
$tempPath = $env:temp + "\ToggleUpdates.ps1"
|
||||
|
||||
# Download the network script
|
||||
$wc = New-Object System.Net.WebClient
|
||||
$wc.DownloadFile($networkLocation, $tempPath)
|
||||
# Invoke the network script
|
||||
&$tempPath $appId
|
||||
# Delete the network script
|
||||
Remove-Item -Path $tempPath
|
||||
}
|
@ -1,7 +1,12 @@
|
||||
# function that takes in an app id as a number and returns the path to the steam library folder that contains the app id
|
||||
function parseVDFforPath([int]$appId) {
|
||||
# Steam libary folder vdf if using scoop
|
||||
$scoopVDF = "$env:USERPROFILE\scoop\apps\steam\current\steamapps\libraryfolders.vdf"
|
||||
# Steam library folders vdf absolute path
|
||||
$steamLibraryFoldersVDF = "C:\Program Files (x86)\Steam\steamapps\libraryfolders.vdf"
|
||||
$normalVDF = "C:\Program Files (x86)\Steam\steamapps\libraryfolders.vdf"
|
||||
|
||||
# Set the path to the vdf file based on whether you are using scoop or not
|
||||
$steamLibraryFoldersVDF = if (Test-Path $scoopVDF) { $scoopVDF } else { $normalVDF }
|
||||
|
||||
# convert the app id to a string
|
||||
$appIdString = $appId.ToString()
|
||||
|
12
VolumeFix/VolumeFix.ahk
Normal file
12
VolumeFix/VolumeFix.ahk
Normal file
@ -0,0 +1,12 @@
|
||||
; Fix Windows Volume:
|
||||
$Volume_Up::
|
||||
SoundGet, volume
|
||||
Send {Volume_Up}
|
||||
SoundSet, volume + 1
|
||||
Return
|
||||
|
||||
$Volume_Down::
|
||||
SoundGet, volume
|
||||
Send {Volume_Down}
|
||||
SoundSet, volume - 1
|
||||
Return
|
4
mcrcon/rcon.ps1
Normal file
4
mcrcon/rcon.ps1
Normal file
@ -0,0 +1,4 @@
|
||||
$ip = "localhost"
|
||||
$ip = Read-Host -Prompt 'Enter the RCON IP (default: localhost)'
|
||||
$password = Read-Host -MaskInput -Prompt 'Enter the RCON Password'
|
||||
mcrcon -H $ip -p $password
|
29
obs-replay-notification/Beep_on_replay_buffer_save.lua
Normal file
29
obs-replay-notification/Beep_on_replay_buffer_save.lua
Normal file
@ -0,0 +1,29 @@
|
||||
local obs = obslua
|
||||
local ffi = require("ffi")
|
||||
local winmm = ffi.load("Winmm")
|
||||
|
||||
-- Put a sound of your choosing next to "Beep on replay save.lua" and don't forget to match its name either in code below or rename your file.
|
||||
PROP_AUDIO_FILEPATH = script_path() .. "sound_npc_scanner_scanner_photo1.wav"
|
||||
|
||||
ffi.cdef[[
|
||||
bool PlaySound(const char *pszSound, void *hmod, uint32_t fdwSound);
|
||||
]]
|
||||
|
||||
function playsound(filepath)
|
||||
winmm.PlaySound(filepath, nil, 0x00020000)
|
||||
end
|
||||
|
||||
function on_event(event)
|
||||
if event == obs.OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED
|
||||
then playsound(PROP_AUDIO_FILEPATH)
|
||||
end
|
||||
end
|
||||
|
||||
function script_load(settings)
|
||||
obs.obs_frontend_add_event_callback(on_event)
|
||||
end
|
||||
|
||||
-- This Lua script was downloaded from https://gist.github.com/snakecase/e816384a071cec31efbb4b9e429c108d
|
||||
|
||||
-- Credits: upgradeQ (https://gist.github.com/upgradeQ/b2412242d76790d7618d6b0996c4562f), gima (https://gitlab.com/gima/obsnotification)
|
||||
-- Thank you guys!
|
Binary file not shown.
BIN
obs-replay-notification/sound_npc_scanner_scanner_photo1.wav
Normal file
BIN
obs-replay-notification/sound_npc_scanner_scanner_photo1.wav
Normal file
Binary file not shown.
Reference in New Issue
Block a user