Skip to content

Instantly share code, notes, and snippets.

View Benjamin-Dobell's full-sized avatar

Benjamin Dobell Benjamin-Dobell

View GitHub Profile
@Benjamin-Dobell
Benjamin-Dobell / sample.js
Created August 5, 2021 02:12
Snaploader - Preview Interactive Nodes Sample Code
var interactiveNodesElement = document.getElementById('interactive-nodes');
var viewerElement = document.getElementById('viewer3d');
var interactiveNodes = JSON.parse(viewerElement.getAttribute('data-interactive-nodes'));
var interactiveNodeOptions = {};
for (var i = 0; i < interactiveNodes.length; i++) {
var nodeName = interactiveNodes[i];
interactiveNodeOptions[nodeName] = {};
@Benjamin-Dobell
Benjamin-Dobell / 1.png
Last active July 15, 2020 17:17
EmmyLua Definition File
1.png
@Benjamin-Dobell
Benjamin-Dobell / all-cards-to-issues.js
Last active October 27, 2019 15:19
all-cards-to-issues.js
const PROJECT_BOARD_URL = "https://github.com/glassechidna/prototypeinertia/projects/2"
document.querySelectorAll('.issue-card').forEach(function(node) {
if (node.getAttribute('data-card-type') == "[\"issue\"]") { return }
var cardId = node.getAttribute('data-card-id');
var title = node.querySelector('.js-comment-body > p').textContent
var authenticityToken = node.querySelector('template').content.querySelector('input[name="authenticity_token"').value
var clientUid = document.querySelectorAll('.issue-card')[1].querySelector('template').content.querySelector('input[name="client_uid"').value
@Benjamin-Dobell
Benjamin-Dobell / gist:68b3353a2469b646854a814aaa6f0e54
Created July 23, 2019 19:49
SteamKit Matchmaking Integration Test Ouput
Cloning https://github.com/Benjamin-Dobell/SteamKit.git:matchmaking...
Cloning into 'SteamKit'...
Submodule 'Resources/Protobufs' (https://github.com/steamdatabase/protobufs.git) registered for path 'Resources/Protobufs'
Cloning into '/app/SteamKit/Resources/Protobufs'...
Submodule path 'Resources/Protobufs': checked out 'd8aa67feea3ce8147072d893418ef69292213730'
Building integration tests...
Restore completed in 7.8 sec for /app/SteamKit/SteamKit2/SteamKit2/SteamKit2.csproj.
Restore completed in 10.38 sec for /app/SteamKitIntegrationTests/SteamKitIntegrationTests.csproj.
Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
This file has been truncated, but you can view the full file.
@Benjamin-Dobell
Benjamin-Dobell / JSON.lua
Created March 19, 2019 13:28
JSON.lua version included in TTS as of 2019-03=20
-- -*- coding: utf-8 -*-
--
-- Simple JSON encoding and decoding in pure Lua.
--
-- Copyright 2010-2014 Jeffrey Friedl
-- http://regex.info/blog/
--
-- Latest version: http://regex.info/blog/lua/json
--
-- This code is released under a Creative Commons CC-BY \"Attribution\" License:
require 'lua-compile/cyclic'
math.randomseed(os.time())
---@type prototype_inertia__Debug
local Debug = require('Debug')
---@type ge_tts__Http
local Http = require('ge_tts/Http')
#!/usr/bin/env bash
set -e
BASE_DIR=$(dirname $0)
DISABLE_SAVE=false
EMPTY_GAME=false
RELEASE=false
@Benjamin-Dobell
Benjamin-Dobell / ContainerEventsFix.ttslua.lua
Created September 30, 2018 22:03
TTS onObjectEnterContainer work around
-- We use onCollisionEnter (requires InstanceCollisionProxy be included in Card scripts) and onUpdate event handlers as a hacky work-around for
-- onObjectEnterContainer not firing when it should. For this to work reliably we must be the first subscriber to the onObjectDestroy event.
-- Bug report: http://www.berserk-games.com/forums/showthread.php?5461-onObjectEnterContainer-never-fires-for-bottom-card
ge_tts_package('ge_tts/ContainerEventsFix', function()
local Logger = ge_tts_require('ge_tts/Logger')
local EventManager = ge_tts_require('ge_tts/EventManager')
local frameCardObjectCollisions = {}
local frameCardObjectEnteredDecks = {}
➜ HMM git clone git@github.com:Benjamin-Dobell/regenerator.git
Cloning into 'regenerator'...
remote: Counting objects: 3592, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3592 (delta 1), reused 1 (delta 1), pack-reused 3589
Receiving objects: 100% (3592/3592), 4.31 MiB | 1.98 MiB/s, done.
Resolving deltas: 100% (2275/2275), done.
➜ HMM cd regenerator
➜ regenerator git:(master) git checkout -b fix-csp origin/fix-csp
Branch 'fix-csp' set up to track remote branch 'fix-csp' from 'origin'.