Skip to content

Instantly share code, notes, and snippets.

View ScruffyRules's full-sized avatar

ScruffyRules ScruffyRules

View GitHub Profile
/*
Copyright 2022 ScruffyRuffles
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
@ScruffyRules
ScruffyRules / GlobalProfileHandler.cs
Last active February 22, 2021 12:11 — forked from MerlinVR/GlobalProfileHandler.cs
Basic global profiling scripts for Udon. Throw one of each script on a game object that has a TMP UI text somewhere in its children.
#define AVERAGE_OUTPUT
using UdonSharp;
using UnityEngine;
[DefaultExecutionOrder(1000000000)]
public class GlobalProfileHandler : UdonSharpBehaviour
{
public UnityEngine.UI.Text _timeText;
private GlobalProfileKickoff _kickoff;
@ScruffyRules
ScruffyRules / ArmatureGizmo.cs
Created September 3, 2020 16:31
A utility to show the axes of humanoid bones as gizmos
/*
MIT License
Copyright (c) 2020 Scott Scheiner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@ScruffyRules
ScruffyRules / UnityLightTemperatureConvert.cs
Last active January 22, 2023 06:49
Converts Light Temperature into RGB color
/*
Copyright 2019 ScruffyRules
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR O

Keybase proof

I hereby claim:

  • I am ScruffyRules on github.
  • I am scruffyrules (https://keybase.io/scruffyrules) on keybase.
  • I have a public key whose fingerprint is AF45 4486 19C5 A58A 4E91 DECF D51D 3AB8 5D27 8502

To claim this, I am signing this object:

@ScruffyRules
ScruffyRules / gitio.py
Last active March 15, 2017 15:09 — forked from dotStart/gitio.py
Provides a simple Hexchat plugin for replacing GitHub URLs with shortened links.
#
# Copyright 2015 Johannes Donath <johannesd@torchmind.com>
# and other copyright owners as documented in the project's IP log.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@ScruffyRules
ScruffyRules / Phteven.py
Created May 9, 2015 10:15
Auto Updates Phteven based on GitHub commit messages
import requests
import zipfile
import os
import shutil
import json
import time
import sys
def unzip(source_filename, dest_dir):
with zipfile.ZipFile(source_filename) as zf:
@ScruffyRules
ScruffyRules / .htaccess
Created January 11, 2015 21:19
ShareX URL Shortener
RewriteEngine On
RewriteRule ^(?!.*\.php)(.*)$ go.php?jam=$1 [NC,L]
package com.scruffyrules.lootcrate;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at com.ionprogramming.ld30.TitleScreen.render(TitleScreen.java:78)
at com.ionprogramming.ld30.LD30.paint(LD30.java:56)
at com.ionprogramming.ld30.LD30.update(LD30.java:72)
at sun.awt.RepaintArea.updateComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)