Skip to content

Instantly share code, notes, and snippets.

View BenMcLean's full-sized avatar

Benjamin McLean BenMcLean

View GitHub Profile
@BenMcLean
BenMcLean / JustTheTrackTitlesPlease.bat
Last active February 16, 2024 16:11
Gets just the track titles from MusicBrainz
@ECHO OFF
cd %~dp0
python.exe %~dpn0.py %1 %2 %3 %4 %5 %6 %7 %8
@PAUSE
@BenMcLean
BenMcLean / quadraphonic-mka-to-surround51.bat
Last active May 27, 2022 15:15
Quadraphonic FLACs converted to fake 5.1 Surround FLACs
@ECHO OFF
cd %~dp0
for /f "eol=: delims=" %%F in ('dir /b /a-d *.mka ^| findstr /vixc:"%~nx0"') do ( ffmpeg.exe -i "%%F" -af "pan=5.1|FL=FL|FR=FR|BL=SL|BR=SR" "%%F.flac" )
@PAUSE
version: "3"
services:
sftpgo:
image: "drakkan/sftpgo:v2-alpine"
# default user id
user: 1026
restart: always
expose:
# HTTP
- "8080"
$set(_year,$left($if2(%originaldate%,%date%),4))
$if(_year,%_year% )
%album%
$if($and(%releasetype%,$not($find(%releasetype%,album))), \(%releasetype%\))
($if2(%albumartist%,%artist%))
$if($eq($upper(%_extension%),MP3),, $upper(%_extension%))
/
$if($gt(%totaldiscs%,1),$if(%discsubtitle%,CD$num(%discnumber%,$len(%totaldiscs%)) %discsubtitle%/)$num(%discnumber%,$len(%totaldiscs%))-,)
$num(%tracknumber%,$if($gt($len(%totaltracks%),2),$len(%totaltracks%),2)) %title%
$if($find(%albumartist%,Various), \(%artist%\))
// Pixelated font shader by lox9973
// It is a cutout shader, using alpha blending for 1 pixel antialiasing on the edges.
// Intended use is "3D Text" on an opaque object like a sign.
Shader "UI/PixelFont" {
Properties {
_MainTex ("Font Texture", 2D) = "white" {}
_Color ("Text Color", Color) = (1,1,1,1)
}
SubShader {
// Below Transparent queue. Renders after the skybox, but writes to depth.
@BenMcLean
BenMcLean / 3dify-REDHydrogenOneDownmix.bat
Last active May 27, 2022 15:18
Uses https://ffmpeg.org/ to tag a video file as being SBS 3D. Just drag+drop the video file onto this batch file in same folder with ffmpeg.exe
@ECHO OFF
cd %~dp0
ffmpeg.exe -i "%~1" -c:v copy -c:a aac -af "pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE,volume=1.660156" -metadata:s:v:0 stereo_mode=1 "%~n1_half_2x1.mp4"
echo Output file is: "%~n1_half_2x1.mp4"
@PAUSE
@BenMcLean
BenMcLean / VirtualBoyGo.ps1
Last active July 12, 2019 01:19
VirtualBoyGo powershell
<#
.SYNOPSIS
Downloads VirtualBoyGo source code
.DESCRIPTION
Gathers all dependencies and places them in the correct folders!
.NOTES
Author : Benjamin McLean mclean.ben@gmail.com
.LINK
https://github.com/CidVonHighwind/VirtualBoyGo
#>
@BenMcLean
BenMcLean / .gitconfig
Created February 14, 2019 22:53
apply-gitignore alias for Git
[alias]
                apply-gitignore = !git ls-files -ci --exclude-standard -z | xargs -0r git rm --cached
@BenMcLean
BenMcLean / movegit.bat
Last active May 27, 2022 15:19
Batch file to transfer a Git repository to a different remote repo
cd %~dp0
for %%g in ("%1") do set "Folder=%%~ng"
mkdir %Folder%
cd %Folder%
git clone --mirror %1
cd %Folder%.git
git config --unset core.bare
git remote remove origin
git remote add origin %2
git push -u origin --all
@willnationsdev
willnationsdev / gdnative_guide_windows64debug.md
Last active June 16, 2022 14:41
A quick guide on building a GDNative C++ project

Creating a GDNative Library (Windows)

This guide specifically shows how to get a Windows 10 x64 OS compiled for a Windows x64 Debug dynamic library and integrate it into a Godot project.

To begin, make sure you are running the appropriate command line tool as an administrator.

Create a SimpleLibrary directory and enter it. This is where our Godot and GDNative projects will exist. For later use, we will also create subdirectories for libraries (lib) and source code (src). Once inside, we get a copy of each necessary repository for C++ NativeScript bindings generation and enter into the cpp_bindings directory.

mkdir SimpleLibrary