Skip to content

Instantly share code, notes, and snippets.


Ben Randall veleek

View GitHub Profile
veleek / compose.yaml
Last active Jan 15, 2022
Minecraft Bedrock Docker Compose
View compose.yaml
version: '3.4'
image: itzg/minecraft-bedrock-server
GAMEMODE: survival
- 19132:19132/udp
veleek / phaserstuff.js
Last active Nov 27, 2021
Phaser Tile/World/Object XY conversions for orthogonal maps.
View phaserstuff.js
* Get the world XY position of a tile that takes into account the offset of the container with this map in it.
* This returns the origin of the tile sprite which is 64x64 whereas the actual tilemap tile size is only 64x32, so
* the world position is actually outside of the individual tile bounds. The tiles overlap in the isometric grid
* though so we only really care about the specific point.
* @param tileX
* @param tileY
public tileToWorldXY(tileX: number, tileY: number): Phaser.Math.Vector2 {
const worldPos =, tileY, null, null, "floor");
veleek / CloudFilesAutoResponderRules.farx
Last active Jan 7, 2020
Helper files for performing a rough validation of the functionality of the Duplicati CloudFiles backend without depending on having an actual Rackspace account. Import the AutoResponder Rules and add the Fiddlerscript rules to your Fiddler Rules file in the Handler class.
View CloudFilesAutoResponderRules.farx
<?xml version="1.0" encoding="utf-8"?>
<AutoResponder LastSave="2020-01-06T22:02:18.2787399-08:00" FiddlerVersion="5.0.20194.41348">
<State Enabled="true" Fallthrough="true" UseLatency="false">
<ResponseGroup Id="06245c5d-eff4-474e-a452-62d3f99a6bd3" Header="CloudFilesTest" />
<ResponseRule GroupId="06245c5d-eff4-474e-a452-62d3f99a6bd3" Match="" Action="NEW_RESPONSE_16_49_04" Enabled="true" Headers="SFRUUC8xLjEgMjAwIEdlbmVyYXRlZA0KQ29udGVudC1MZW5ndGg6IDANCkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA0KWC1TdG9yYWdlLVVybDogaHR0cHM6Ly9pZGVudGl0eS5hcGkucmFja3NwYWNlY2xvdWQuY29tL2ZpbGVzLw0KWC1BdXRoLVRva2VuOiBUb2tlbkFCQzEyMw0KDQo=" />
<ResponseRule GroupId="06245c5d-eff4-474e-a452-62d3f99a6bd3" Match="method:GET" Action="NEW_RESPONSE_16_54_53" Enabled="true" Headers="SFRUUC8xLjEgMjAwIEdlbmVyYXRlZA0KQ29udGVudC1MZW5ndGg6IDQzOA0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PXV0Zi04DQoNCg=="
veleek / ContentKey.Cli.csproj
Last active Oct 7, 2019
Minimal repro for KeyVault "No such host is known" error:
View ContentKey.Cli.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PackageReference Include="Azure.Identity" Version="1.0.0-preview.4" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.0.0-preview.4" />
veleek / python_openzwave-build.log
Created Apr 17, 2019
Complete python_openzwave build output for successful build.
View python_openzwave-build.log
(venv) PS C:\code\GitHub\veleek\python-openzwave [0.5.x]> python build --flavor=dev
sysargv ['', 'build']
Found SETUP_DIR : C:\code\GitHub\veleek\python-openzwave
<pyozw_setup.DevTemplate object at 0x00000207C15A2358>
{'name': 'libopenzwave', 'sources': ['src-lib/libopenzwave/libopenzwave.pyx'], 'include_dirs': ['src-lib\\libopenzwave', 'C:\\code\\GitHub\\veleek\\python-openzwave\\openzwave\\build', 'C:\\code\\GitHub\\veleek\\python-openzwave\\openzwave\\cpp\\build\\windows', 'C:\\code\\GitHub\\veleek\\python-openzwave\\openzwave\\cpp\\src', 'C:\\code\\GitHub\\veleek\\python-openzwave\\openzwave\\cpp\\src\\value_classes', 'C:\\code\\GitHub\\veleek\\python-openzwave\\openzwave\\cpp\\src\\platform'], 'define_macros': [('PY_LIB_VERSION', '0.4.18'), ('PY_LIB_FLAVOR', '--flavor=dev'), ('PY_LIB_BACKEND', 'cython'), ('CYTHON_FAST_PYCCALL', 1), ('_MT', 1), ('_DLL', 1), ('PY_SSIZE_T_CLEAN', 1), ('PY_LIB_FLAVOR', 'dev'), ('PY_LIB_BACKEND', 'cython')], 'libraries': ['setupapi'
veleek / benran-boxstarter-work.ps1
Last active Aug 17, 2021
Boxstarter Script for my work machines
View benran-boxstarter-work.ps1
# Install BoxStarter
# Set-ExecutionPolicy Unrestricted -Scope Process -Force; . { iwr -useb } | iex; Get-Boxstarter -Force
# Execute this BoxStarter Package
# Install-BoxstarterPackage -DisableReboots -PackageName
# Trust PSGallery
Get-PackageProvider -Name NuGet -ForceBootstrap
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableExpandToOpenFolder -EnableShowRibbon
veleek / benran-boxstarter.ps1
Last active Jul 21, 2020
BoxStarter script for setting up my laptop
View benran-boxstarter.ps1
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableExpandToOpenFolder
Set-TaskbarOptions -Combine Full
# Utilities
cinst microsoft-windows-terminal
cinst 7zip.install
cinst notepadplusplus.install
veleek / LevelDatParser.cs
Created Oct 3, 2017
LinqPad script to load a Level.dat file from Minecraft Better Together
View LevelDatParser.cs
void Main()
string path = @"Path to your Level.dat";
Level l = new Level();
catch (Exception e)
veleek / npm-debug.log
Created Nov 15, 2016
electron-quick-start install failure
View npm-debug.log
4002 silly mapToRegistry using default registry
4003 silly mapToRegistry registry
4004 silly mapToRegistry data Result {
4004 silly mapToRegistry raw: 'delayed-stream',
4004 silly mapToRegistry scope: null,
4004 silly mapToRegistry escapedName: 'delayed-stream',
4004 silly mapToRegistry name: 'delayed-stream',
4004 silly mapToRegistry rawSpec: '',
4004 silly mapToRegistry spec: 'latest',
4004 silly mapToRegistry type: 'tag' }
veleek / gist:fbb7288f6daa258b3df4dfe6961f7a97
Created Nov 15, 2016
OneGet Installation of chocolatey installs to wierd path
View gist:fbb7288f6daa258b3df4dfe6961f7a97
PS C:\src\xbox> install-package chocolatey -verbose -ProviderName Chocolatey
DEBUG: 00:00:00.0000002 Calling 'Chocolatey::GetDynamicOptions' 'Provider'
DEBUG: 00:00:00.0056436 Calling 'Chocolatey::GetDynamicOptions' 'Source'
DEBUG: 00:00:00.0164123 Calling 'Chocolatey::GetDynamicOptions' 'Package'
DEBUG: 00:00:00.0220975 Calling 'Chocolatey::GetDynamicOptions' 'Install'
DEBUG: 00:00:00.0269860 Calling SearchForPackages. Name='chocolatey'
VERBOSE: Using the provider 'Chocolatey' for searching packages.
DEBUG: 00:00:00.0287840 PackageProvider::FindPackage with name chocolatey
DEBUG: 00:00:00.0293678 Calling SearchForPackages After Select 1
DEBUG: 00:00:00.0331302 Calling 'Chocolatey::FindPackage' 'chocolatey','','','','0'