Skip to content

Instantly share code, notes, and snippets.

Benjamin McLean BenMcLean

Block or report user

Report or block BenMcLean

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build.bat
@echo on
cd %~dp0
cd ..
git pull
git submodule update
cd build
cmake -GNinja ..
cmake --build .
BenMcLean / GreenPixel.cs
Created Aug 7, 2019
Steps to procedurally generate a texture in Godot
View GreenPixel.cs
// Steps to procedurally generate a texture in Godot
// 1. Make a PoolByteArray
// 2. Make an Image
// 3. Make a Texture
Image image = new Image();
image.CreateFromData(1, 1, false, Image.Format.Rgba8, new byte[] { 0, 255, 0, 255 });
ImageTexture it = new ImageTexture();
BenMcLean / get-state.bat
Last active Jul 27, 2019
Oculus Quest ADB stuff
View get-state.bat
cd ..\Local\Android\Sdk\platform-tools
adb get-state
BenMcLean / 3dify-youtube.bat
Last active Jul 12, 2019
Uses 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
View 3dify-youtube.bat
cd %~dp0
ffmpeg -i %1 -vcodec libx264 -x264opts frame-packing=3 "%~n13D%~x1"
echo Output file is: "%~n13D%~x1"
BenMcLean / VirtualBoyGo.ps1
Last active Jul 12, 2019
VirtualBoyGo powershell
View VirtualBoyGo.ps1
Downloads VirtualBoyGo source code
Gathers all dependencies and places them in the correct folders!
Author : Benjamin McLean
BenMcLean / log.txt
Created May 18, 2019
psptoolchain install result 2019-05-18
View log.txt
This file has been truncated, but you can view the full file.
Running dependency scripts
Running dependency script:
Running dependency script:
Running dependency script:
Checking headers of libELF:
Checking for header elf.h... yes
Checking for header libelf.h... yes
Checking for header gelf.h... yes
Checking headers of libUSB (legacy):
BenMcLean / .gitconfig
Created Feb 14, 2019
apply-gitignore alias for Git
View .gitconfig
                apply-gitignore = !git ls-files -ci --exclude-standard -z | xargs -0r git rm --cached
BenMcLean / darkplaces.service
Last active Oct 25, 2018
darkplaces-server as a systemd service on Ubuntu
View darkplaces.service
Description=This service spawns a Darkplaces Quake dedicated server.
# Place this file in /lib/systemd/system
# To enable this service to launch at boot time, enter in a terminal: systemctl enable darkplaces.service
# To disable this service from launching at boot time, enter in a terminal: systemctl disable darkplaces.service
# To check the state of all existing unit files, enter in a terminal: systemctl list-unit-files
# I followed these instructions to install Darkplaces, except for the parts about starting the dedicated server on boot because those parts don't work anymore:
# I based this service on
BenMcLean /
Last active Oct 6, 2018
Simple libGDX app
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import com.badlogic.gdx.utils.viewport.FitViewport;
BenMcLean / movegit.bat
Created Sep 25, 2018
Batch file to transfer a Git repository to a different remote repo
View movegit.bat
for %%g in ("%1") do set "Folder=%%~nxg"
mkdir %Folder%
cd %Folder%
git clone --mirror %1
cd %Folder%.git
git config --unset core.bare
git reset --hard
git remote remove origin
git remote add origin %2
git push -u origin --all
You can’t perform that action at this time.