Skip to content

Instantly share code, notes, and snippets.

View benallfree's full-sized avatar

Ben Allfree benallfree

View GitHub Profile
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Debug View</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/full.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
@benallfree
benallfree / starter.md
Last active April 1, 2025 04:26
3D FPS web starter

I am building a mobile-first 3D FPS MMO web game. Please set up a basic project structure as follows:

  • Use bun for package management
  • Use Vite + Typescript for the frontend
  • Use bun + Typescript + expressjs for the backend
  • Use socket.io for communication

Features:

  • Opengraph - uses splash.jpg image
@benallfree
benallfree / vibeverse.html
Last active March 31, 2025 20:57
levelsio vibeverse HUD buttons
<div
id="nav-group"
style="
font-family: 'system-ui', sans-serif;
position: fixed;
bottom: -1px;
left: -1px;
padding: 7px;
font-size: 14px;
@benallfree
benallfree / vibeverse.js
Last active April 3, 2025 14:34
Add Vibeverse support to your game
/**
* Vibeverse
* -----------------------
* The Vibeverse (x.com/hashtag/vibeverse)is an interconnected network of 3D web games with portals to and from each game.
* You can even bring your custom player avatar along with you.
*
* Credit to @levelsio for the original implementation of this portal system.
* -----------------------
* Integration guide for connecting your experience to the Vibeverse metaverse.
*
# Vibe Portal - 3D Multiplayer Experience
## Tech Stack
### Frontend
- react
- react-three-fiber
- Three.js
- Vite + TypeScript

Upstream Anchoring: A Versioning Strategy for Forked Packages

Introduction

Upstream Anchoring is a versioning strategy designed to align forked package versions with their upstream counterparts while allowing for independent patch revisions. It ensures clarity, compatibility, and ease of tracking changes, making it ideal for maintaining synchronization without introducing version conflicts.

How it works

  • Version Structure: Keep the MAJOR and MINOR versions identical to the upstream package.
  • Patch Calculation:
@benallfree
benallfree / iconify
Last active May 28, 2020 12:10
electron-react-boilerplate icon generation
#!/bin/bash
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/..
RSC="$ROOT/resources"
SRC="${RSC}/icons/1024x1024.png"
echo $SRC
if [ ! -f "$SRC" ]; then
echo "Please create resources/icons/1024x1024.png before running this script."
@benallfree
benallfree / fields-form.js
Created March 20, 2019 12:43
Toolset types plugin allow duplicate labels across repeating field groups
/* ./vendor/toolset/types/resources/js/fields-form.js */
/**
* Static Data
*/
var fieldFormStaticData;
/**
* fields edit
*/
jQuery(document).ready(function($){
<div>*|FEEDBLOCK:http://ctoguy.com/feed.rss?pw=asdf|*<br />
*|FEEDITEMS:[$count=4]|*
<h4><a href="*|FEEDITEM:URL|*">*|FEEDITEM:TITLE|*</a></h4>
<div style="clear: both; word-break: keep-all"><a href="*|FEEDITEM:URL|*"><img src="*|FEEDITEM:ENCLOSURE_URL|*" style="border: 0px initial;
width: 250px;
margin: 0px;
border-radius: 3px;
float: left;
margin-right: 15px;
@benallfree
benallfree / trellis-tools.sh
Created July 15, 2017 01:18
Command line tools installation
# If you need HomeBrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Yarn
brew install yarn
# Install Hugo
brew install hugo
# Sublime command line shortcut