Skip to content

Instantly share code, notes, and snippets.

View juggernate's full-sized avatar

Nate Allison juggernate

  • South Jordan, UT
View GitHub Profile
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@AJolly
AJolly / amazon_bypass_need_anything_else.js
Last active January 1, 2026 18:29
Amazon Bypass Need anything else? Checkout UserScript
// ==UserScript==
// @name Amazon Auto Checkout and No Thanks
// @version 0.4
// @description Automatically clicks the "Continue to checkout" button on Amazon cart pages and "No Thanks" on product pages
// @match https://www.amazon.com/cart/byc/ref=ox_sc_byg_proceed*
// @match https://www.amazon.com/gp/product/*
// @match https://www.amazon.com/dp/*
// @match https://www.amazon.com/*/dp/*
// @match https://www.amazon.com/cart/smart-wagon*
// @namespace https://gist.github.com/AJolly
@BigRoy
BigRoy / usd_sdf_move_prim_spec.py
Last active March 16, 2026 22:03
USD API move prim spec including repathing relationships and connections to it and its children in a single Sdf Layer
from pxr import Sdf, Usd
LIST_ATTRS = ['addedItems', 'appendedItems', 'deletedItems', 'explicitItems',
'orderedItems', 'prependedItems']
def repath_properties(layer, old_path, new_path):
"""Re-path property relationship targets and attribute connections.
This will replace any relationship or connections from old path
@joaen
joaen / debugpy_maya_tutorial.md
Last active April 6, 2026 22:45
How to attach VS Code Python debugger to Autodesk Maya 2022+

If you're having trouble with the MayaPy extension in VS Code note that it still utilizes ptvsd, which Microsoft has deprecated as of 2020.

This tutorial will guide you through the process of setting up debugging with debugpy, the latest and improved Python debugger for VS Code.

Note: This tutorial is primarily intended for users of Python 3 and Maya 2022 (or later).

Note: You need to have the official Python extension installed in VS Code.

Method 1: Remote Attach

@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 December 9, 2025 14:04
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 March 22, 2026 15:23
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 January 1, 2026 05:36
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)