Skip to content

Instantly share code, notes, and snippets.

View foopis23's full-sized avatar

Eric Sexton foopis23

View GitHub Profile
@foopis23
foopis23 / bulma-responsive-spacing.scss
Last active December 12, 2022 18:12
bulma-responsive-spacing.scss
// import this after importing all of bulma
// add responsive spacing helpers
@each $property,
$shortcut in $spacing-shortcuts {
@each $name,
$value in $spacing-values {
// All directions
@foopis23
foopis23 / startup.lua
Last active July 3, 2023 21:41
A start up script to make craftos more like unix
local expect = dofile("rom/modules/main/cc/expect.lua").expect
if not fs.exists("/bin") then
fs.makeDir("/bin")
end
if not fs.exists("/home") then
fs.makeDir("/home")
end
@foopis23
foopis23 / index.php
Last active August 28, 2022 18:14
A simple file UI for web server written in PHP
<?php
// CONFIG
$override_title = null; //set overide title to use instead of directory name
// END CONFIG
?>
<?php
@foopis23
foopis23 / checkout.sh
Created June 13, 2022 14:57
Checkout Latest Tag
# Get new tags from remote
git fetch --tags
# Get latest tag name
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
# Checkout latest tag
git checkout $latestTag
@foopis23
foopis23 / Example.cs
Created February 28, 2022 17:08
VRChat Send Events to Specific Players
public class ExampleUsage : UdonSharpBehaviour {
public void OnGameFinished() {
// determine the winner somehow up here
VRCSDKBaseVRCPlayerApi wiwnner = ...
// find the winner and run the teleport command on them
for (var i = 0; i < networkManager.playerIds.Length; i++)
{
if (networkManager.playerIds[i] == winner.playerId) {
networkManager.clients[i].SendCustomNetworkEvent(NetworkEventTarget.Owner, "TeleportPlayerToSpawn");
@foopis23
foopis23 / vector2.ts
Created February 22, 2022 17:31
Simple Vector2 Math
export interface Vector2 {
x: number
y: number
}
const distance = (a: Vector2, b: Vector2): number =>
Math.sqrt((b.x - a.x) ** 2 + (b.y - a.y) ** 2)
const subtract = (b: Vector2, a: Vector2): Vector2 => {
return { x: b.x - a.x, y: b.y - a.y }
@foopis23
foopis23 / clamp.ts
Last active February 22, 2022 17:39
Game Math Functions for TS
function clamp (v: number, min: number, max: number): number {
return Math.min(Math.max(v, min), max)
}
@foopis23
foopis23 / vrapp.js
Created June 10, 2021 15:23
Simple Multiplayer with THREE JS & Firebase
// Option 1: Import the entire three.js core library.
import * as THREE from 'three';
import { BoxBufferGeometry, Mesh, MeshPhongMaterial } from 'three';
import { BoxLineGeometry } from 'three/examples/jsm/geometries/BoxLineGeometry.js';
import { VRButton } from 'three/examples/jsm/webxr/VRButton.js';
import { XRControllerModelFactory } from 'three/examples/jsm/webxr/XRControllerModelFactory.js';
let DB;
ffffffffffffffffffffffffffffffffffffffffffffffffffccffffffffffffffffffffffcfff7ffffffffffffcfffffffffffffffff9ffffcffffff
fffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffcfc7fcccffffffff7ffc7ff7ffff7ffffffffffff7fffffffffff
ffffffffffffffffffffffc7fffffffffffffffffffffffffffffffffffffffffbffff77a77ffffcbf7f7f7fcff7fffffffffffffffff7fffffcfffff
cfffffffffcff7cfff7fffcccccccffffff7ffffffffffffffccfffffffffffffffff7fff77fff7777cc7c7fffffffffffffffffffff7ffffff7f7fff
ffffffffffcfffffffccceeeeeeeeecccfffffffffffffffff77fffffff7cffffffffffffc777ccc77fcfccfffffffff7ff7ffffffff7ffffffff7fff
ffffffffffcffffffcee66666666666eeccffcffffffffffff77fffffffffffffffffffcccc7777ccf7fffffffffffffcfffffffff7ffffffffff7fff
fffffffffffffffcee666666666666666eeccfff7fffffffffcfffffffffffffffff7cccccfc77bab77cfffffffff7ffffffffffffffffffffffffff7
ffffffffffffffce6666666666666660666eeccffffffcffffffffcffffffffffffffff7fffc7c7fccfffffffcffff7fffffffffffffffffffffffffa
fffffffffffffce6666666666666666066661ecffffff7ff
333333333333333333333333333333333333333333333333333333333333333333333333333333333333338c7c7333333333333333333333333878777
3333333333333333333333333333333333333333333333333333333333333333333333333333333333333cccc7c333333333333333333333387777777
3333333333333333333333333333333333333333333333333333333333333333333333333333333333333cc7c7cc33333333333333333338777777777
333333333333333333333333333333333333333333333333333333333333333333333333333c7ccccc7ccccccccccccccc33333333333878777778777
333333333333333333333333333333333333c333333333333333333333333333cccccccc7cccccccc7cc7cccccccccc7cc7c3cc333387777777778777
3333333333333333333333333333333333c77c3333333333333cc7ccccc7c7ccccccccc7cccc77c7cccccccccccccccccccc7ccccc877c77877777c77
3333333333333333333333333333333333c7c7c33cccccccccccc7ccccccccccccccccccc7c7c7cce8cc7cc7ccccccc77cccccccccc7cc78cc7c77c77
333333333333333333333333333333333cc7777cc7cccc7cccccccccccccccccccc7ccccccc7ccc788ccccccc7ccccc77cc7ccc7ccc7cccccc7c77cc7
333333333333333333333333300000cccc777777cccccccc