Skip to content

Instantly share code, notes, and snippets.

View juggernate's full-sized avatar

Nate Allison juggernate

  • South Jordan, UT
View GitHub Profile
@sinbad
sinbad / InputModeDetector.cpp
Last active March 18, 2024 19:02
UE4 detecting which input method was last used by each player
#include "InputModeDetector.h"
#include "Input/Events.h"
FInputModeDetector::FInputModeDetector()
{
// 4 local players should be plenty usually (will expand if necessary)
LastInputModeByPlayer.Init(EInputMode::Mouse, 4);
}
bool FInputModeDetector::HandleKeyDownEvent(FSlateApplication& SlateApp, const FKeyEvent& InKeyEvent)
@BigRoy
BigRoy / maya_remove_CgAbBlastPanelOptChangeCallback.py
Created August 8, 2019 09:50
Little snippet to remove "CgAbBlastPanelOptChangeCallback" error from Maya scene - // Error: line 1: Cannot find procedure "CgAbBlastPanelOptChangeCallback". //
"""
This will iterate all modelPanels and remove the "CgAbBlastPanelOptChangeCallback"
As such, after running this the following error should be fixed:
// Error: line 1: Cannot find procedure "CgAbBlastPanelOptChangeCallback". //
"""
from maya import cmds
for model_panel in cmds.getPanel(typ="modelPanel"):
@kevinelliott
kevinelliott / 1-macOS-10.14-mojave-setup.md
Last active April 2, 2023 11:46
macOS 10.14 Mojave Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.14 Mojave Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.14 Mojave.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@vidia
vidia / nginx-unificontroller.conf
Last active May 6, 2024 12:41
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
@sinbad
sinbad / LightFlickerEffect.cs
Last active March 22, 2024 09:02
Unity simple & fast light flicker script
using UnityEngine;
using System.Collections.Generic;
// Written by Steve Streeting 2017
// License: CC0 Public Domain http://creativecommons.org/publicdomain/zero/1.0/
/// <summary>
/// Component which will flicker a linked light while active by changing its
/// intensity between the min and max values given. The flickering can be
/// sharp or smoothed depending on the value of the smoothing parameter.
@MadsJakobsen
MadsJakobsen / maya_proxy_attr.py
Last active February 9, 2021 18:56
Maya proxy attribute
import pymel.core as pymel
transform1 = pymel.createNode('transform', name='fk_control')
transform2 = pymel.createNode('transform', name='ik_control')
transform3 = pymel.createNode('transform', name='blender')
transform3.addAttr('ikFkSwitch', keyable=True, min=0, max=1)
for node in transform1, transform2:
node.addAttr('ikFkSwitch', usedAsProxy=True, keyable=True, min=0, max=1)
transform3.ikFkSwitch.connect(node.ikFkSwitch)
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 8, 2024 18:53
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@LotteMakesStuff
LotteMakesStuff / CustomInspectorCreator.cs
Last active May 9, 2024 21:17
Editor extension that adds a tool to automagically generate boilerplate custom inspector code~ YES! Just drop it into a folder called 'Editor' and it adds a 'custom inspector' option into the Project window!
using UnityEngine;
using UnityEditor;
using System.IO;
public static class CustomInspectorCreator
{
[MenuItem("Assets/Create/Custom Inspector", priority = 81)]
static void CreateInsptorEditorClass()
{
foreach (var script in Selection.objects)
@oubiwann
oubiwann / appify.sh
Last active April 29, 2023 10:32 — forked from advorak/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {
@liorbenhorin
liorbenhorin / MayaDockingClass.py
Last active October 3, 2023 13:01
Maya 2017 PySide2 Docking Qt QMainWindow
"""
This is what you need to do in order to get a qt window to dock next to maya channel box,
In all maya versions, including 2017 with PySide2
"""
__author__ = "liorbenhorin@gmail.com"
import sys
import os
import logging
import xml.etree.ElementTree as xml