Skip to content

Instantly share code, notes, and snippets.

View spilth's full-sized avatar
👽
spilth.org

Brian Kelly spilth

👽
spilth.org
View GitHub Profile
@spilth
spilth / one.py
Last active February 9, 2024 03:33
PrintKey to SBL
def values_or_defaults(section="0", subsection="0", block="0", lot="0", subplot="0", suffix="0"):
return section, subsection, block, lot, subplot, suffix
def print_key_to_sbl(print_key):
parts = print_key.replace(".", "-").split("-")
section, subsection, block, lot, subplot, suffix = values_or_defaults(*parts)
return (f'{section.zfill(3)}'
f'{subsection.zfill(3)}'
f'{block.zfill(4)}'
@spilth
spilth / Qgis2dJsonEnvelope.py
Last active October 12, 2023 17:59
Copy the current QGIS Canvas Extent to the clipboard as a 2D JSON Envelope for ArcGIS REST Service Queries
from qgis.gui import QgsMessageBar
from qgis.PyQt.Qt import QApplication
import json
crs = QgsProject.instance().crs()
extent = iface.mapCanvas().extent()
envelope = {
"xmin": extent.xMinimum(),

Keybase proof

I hereby claim:

  • I am spilth on github.
  • I am spilth (https://keybase.io/spilth) on keybase.
  • I have a public key ASD4XSV7OeEY9an8SgZAKsymoML6tWHccTcxnxYaPER1tgo

To claim this, I am signing this object:

@spilth
spilth / Fortnite.digest.verse
Last active April 5, 2024 00:35
Fortnite Verse Digests: Release-24.20-CL-25058254
# Copyright Epic Games, Inc. All Rights Reserved.
#################################################
# Generated Digest of Verse API
# DO NOT modify this manually!
# Generated from build: ++Fortnite+Release-24.20-CL-25058254
#################################################
using {/Verse.org/Colors}
using {/UnrealEngine.com/Temporary/SpatialMath}
using {/Fortnite.com/Playspaces}
@spilth
spilth / testing-multiplayer-uefn-islands.md
Created April 3, 2023 23:00
Testing Multiplayer UEFN Islands

Testing Multiplayer UEFN Islands

  1. Start up UEFN
  2. Open your project
  3. Click "Launch Session"
  4. Wait for Fortnite to start and put you in a UEFN session
  5. Return to Lobby
  6. Game mode should be listed as "UEFN Session"
  7. Press Play and you'll be sent to what looks like a "simulation" room
  8. Invite other people to your party
@spilth
spilth / muckle_manager_device.verse
Created March 31, 2023 13:30
Muckle Manager Device
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
SpawnedMessage<localizes>(ItemName:string, Location:string):message = "The {ItemName} has spawned {Location}!"
DroppedMessage<localizes>(ItemName:string): message = "The {ItemName} has been dropped!"
PickedUpMessage<localizes>(Title:string): message = "Somebody has become {Title}"
TrackerMessage<localizes>(ItemName:string, Location:string):message = "Grab the {ItemName} located {Location}!"
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
capture_barrier := class<concrete>:
@editable
CaptureItemSpawnerDevice:capture_item_spawner_device = capture_item_spawner_device{}
@spilth
spilth / exploratory_device.verse
Created March 27, 2023 01:10
Making class attribute editable in UEFN
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
direction := enum{Up, Down, Left, Right}
coordinates := struct<concrete>:
@editable
X : float = 0.0
@spilth
spilth / Rakefile
Last active September 16, 2022 15:08
Unmined Automation
task :build do
# Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
puts "Building..."
worlds_directory = 'C:\Users\polym\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\minecraftWorlds\\'
newest_world = Dir.entries(worlds_directory).select{|x| x != '.' && x != '..'}.sort_by { |x| File.mtime(worlds_directory + '\\' + x) }.reverse.first
puts newest_world
world = "C:\\Users\\polym\\AppData\\Local\\Packages\\Microsoft.MinecraftUWP_8wekyb3d8bbwe\\LocalState\\games\\com.mojang\\minecraftWorlds\\#{newest_world}"
@spilth
spilth / turbo-drive.md
Created March 10, 2022 00:23
Rails 7 Turbo Drive Basics

Rails 7 Turbo Drive

This is a quick example to help illustrate what a Rails 7 application does when Turbo Drive is enabled versus when it is disabled.

It is assumed you are using the following version of Ruby and Rails:

$ ruby --version
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin21]
$ rails --version