Skip to content

Instantly share code, notes, and snippets.

@Jj0YzL5nvJ
Jj0YzL5nvJ / get_m64p.cmd
Last active May 16, 2023 22:19
Utility to get mupen64plus nightly-builds
@echo off
setlocal enableextensions enabledelayedexpansion
title Get mupen64plus nightly-builds
cls
pushd "%~dp0"
set ERR=if errorlevel 1 goto err
set MSG=The network device is not ready...
for /f "tokens=2 delims=[]" %%I in ('ping -n 1 %COMPUTERNAME% ^| find "["') do set MIP=%%I
if "%MIP%" == "127.0.0.1" goto err
@Jj0YzL5nvJ
Jj0YzL5nvJ / cmd-explorer.cmd
Last active May 20, 2022 20:26
Life hack for Windows CLI users
@echo off
cls
for /f "tokens=2 delims=[]" %%a in ('ver') do set wv=%%a
for /f "tokens=2 delims=. " %%a in ('echo %wv%') do set wv=%%a
net session>nul 2>&1
if errorlevel 1 (
if %wv% LEQ 5 (goto a1) else goto a2)
reg add HKCR\Directory\shell\CommandPrompt /ve /d "Open with Command Prompt" /f>nul 2>&1
reg add HKCR\Directory\shell\CommandPrompt\command /ve /d "%ComSpec% /k pushd \"%%1\" && title Command Prompt" /f>nul 2>&1
reg add HKCR\Drive\shell\CommandPrompt /ve /d "Open with Command Prompt" /f>nul 2>&1
@Jj0YzL5nvJ
Jj0YzL5nvJ / GLideN64_builder.cmd
Last active December 24, 2021 04:05
Utility to build and package "GLideN64" automatically, almost a copy of GLideN64/appveyor.yml script. This is the Alpha version of: https://github.com/gonetz/GLideN64/blob/master/projects/msvc/GLideN64_Builder.cmd
@echo off
:: Last modification: 2020/10/08
setlocal enableextensions disabledelayedexpansion
cls
pushd "%~dps0"
set ORIG=%CD%
set mg=ERROR
set ERR=if errorlevel 1 goto err
if not defined ARCH set ARCH=x64
set TARCH=%ARCH%
@Jj0YzL5nvJ
Jj0YzL5nvJ / angrylion-plus_builder.cmd
Last active October 6, 2020 02:17
Personal utility to build and package "Angrylion-RDP-Plus" automatically
@echo off
:: Last modification: 2020/10/05
setlocal enableextensions disabledelayedexpansion
cls
pushd "%~dps0"
set ORIG=%CD%
set mg=ERROR
set ERR=if errorlevel 1 goto err
if not defined ARCH set ARCH=x64
set TARCH=%ARCH%
@Jj0YzL5nvJ
Jj0YzL5nvJ / cycle-adevice.lua
Last active May 20, 2022 20:37 — forked from bitingsock/cycle-adevice.lua
Cycle through available audio devices with key binds(a,ctrl+a). Change "wasapi" on line 1 to your relevant audio api.
local api = "wasapi"
local deviceList = {}
local function cycle_adevice(s, e, d)
while s ~= e + d do -- until the loop would cycle back to the number we started on
if string.find(mp.get_property("audio-device"), deviceList[s].name, 1, true) then
while true do
if s + d == 0 then --the device list starts at 1; 0 means we iterated to far
s = #deviceList + 1 --so lets restart at the last device
elseif s + d == #deviceList + 1 then --we iterated past the last device
s = 0 --then start from the beginning
@Jj0YzL5nvJ
Jj0YzL5nvJ / m64p_build.sh
Last active June 11, 2023 09:37
Script to build standalone mupen64plus from upstream for *nix systems as user space application
#!/usr/bin/env bash
set -e
unset CORE_VER
unset NO_ASM
unset POSTFIX
CORE_SHORT_NAME="libmupen64plus"
HOST_ARCH="$(uname -m)"
ENV_NAME="$(uname -s)"