Skip to content

Instantly share code, notes, and snippets.

View EntranceJew's full-sized avatar

EntranceJew EntranceJew

  • ejew.in, llc
  • Saint Petersburg, Florida
View GitHub Profile
@EntranceJew
EntranceJew / ShowToolMenu.lua
Created August 4, 2023 08:29
show a tool menu via path-string
include("sandbox/gamemode/spawnmenu/controlpanel.lua")
local function ShowToolMenu( name )
local frame = vgui.Create( "DFrame" )
frame:SetTitle( name )
frame:SetSize( ScrW() * 0.75, ScrH() * 0.75 )
frame:Center()
frame:SetDraggable( true )
frame:ShowCloseButton( true )
frame:SetSizable( true )
@EntranceJew
EntranceJew / bandcamp_sorter.ps1
Created July 18, 2023 22:31
a script that can organize your output from bandcamp-downloader.py
$in_dir = (Get-Item .).FullName
$out_dir = (Get-Item .).FullName + "\__sorted__"
Get-ChildItem ((Get-Item $in_dir).FullPath) |
Foreach-Object {
$name = $_.Name
$artist = ''
$found = $false
foreach ($char in $name.ToCharArray()) {
@EntranceJew
EntranceJew / PixelDot.shader
Created October 20, 2020 14:58 — forked from Fewes/PixelDot.shader
Renders a screen-aligned, distance-independent, resolution-independent, pixel-perfect quad in Unity. Use it with the built-in quad mesh. You don't have to rotate or scale the mesh renderer, the shader will take care of it.
Shader "FX/PixelDot"
{
Properties
{
[NoScaleOffset] _MainTex ("Texture", 2D) = "white" {}
_Color ("Color", Color) = (1, 1, 1, 1)
_Size ("Pixel Size", Range(1, 64)) = 1
}
SubShader
{
@EntranceJew
EntranceJew / SkinnedMeshRendererExtensions.cs
Last active May 21, 2021 08:13
the inspector shows BlendShape names but SkinnedMeshRenderer doesn't let me talk to it using them, makes me irate
using System;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// For working with SkinnedMeshRenderer without failing silently or dealing with age old Unity decisions that were
/// <a href="https://forum.unity.com/threads/removing-clamping-of-blendshapes-to-the-range-0-100.504973/">never fully undone</a>.
/// </summary>
///
public static class SkinnedMeshRendererExtensions {
@EntranceJew
EntranceJew / calculate_amazon_values.py
Created April 10, 2019 10:15
fuck amazon order summaries, business support can't do math any better than me
def permute_sum_contributors(elements, target):
from random import sample
while True:
working = []
workset = sample(elements, k=len(elements))
while True:
working.append(workset.pop())
@EntranceJew
EntranceJew / archive_sorter.ps1
Last active December 28, 2018 18:48
sort those archives
param(
[string]$mo2MyGames = (Join-Path -Path ([environment]::GetFolderPath("MyDocuments")) -ChildPath "My Games\Fallout 76"),
[string]$targetIni = "Fallout76Custom.ini",
[string]$mo2Instance="$env:LOCALAPPDATA\ModOrganizer\Fallout 76",
[string]$mo2Profile="Default",
[string]$mo2GameFolder = "${env:ProgramFiles(x86)}\Bethesda.net Launcher\games\Fallout76"
)
<#
THE PROGRAM, BROKEN DOWN:
1) determine the load order for mods
@EntranceJew
EntranceJew / reset_audio_mixers.ahk
Created June 27, 2018 01:20
I wrote an AutoHotkey script to toggle "Listen to this device" for all windows recording devices, because hot-plugging certain USB devices doesn't reset Windows' loopbacks.
; Y'all want a pringle say fuck that.
; For this to work you need to have the audio mixer be the first thing to the right of the system tray hidden icons.
SetKeyDelay, 78, 45
; Open "Sound" window.
; WinActivate, ahk_class Shell_TrayWnd
Send, {LWin Down}{b}{LWin Up}
Sleep, 33
Send, {Right}
@EntranceJew
EntranceJew / Tabletop Simulator.xml
Created June 7, 2018 00:22
3Dconnexion configuration for Tabletop Simulator
<?xml version="1.0" encoding="UTF-8"?>
<AppCfg Default="false" xmlns="" CfgFormatVersion="1.2" ThisFileVersion="1.10">
<AppInfo>
<Signature>
<Name>Tabletop Simulator</Name>
<ExecutableName>Tabletop Simulator.exe</ExecutableName>
</Signature>
<Options />
</AppInfo>
<CfgProperties>
@EntranceJew
EntranceJew / type_password_in_shitty_program.ahk
Created March 12, 2018 00:48
using autohotkey to get around one-time setup of dumb shit
; note: ~ is the name of my cygwin terminal
WinActivate, ~
WinWaitActive, ~
; even though your password will be interpreted literally
; autohotkey it will still process the entire file for being a valid script before it executes
; so if your password contains % then you need to escape it with ` in order to not make it process it as a variable name
; or if your password contains ` then you may need to escape it with another `
; read more: https://autohotkey.com/docs/commands/Send.htm
SendInput {Raw}YourLiteralPasswordHere
@EntranceJew
EntranceJew / zip2crx.sh
Created September 1, 2017 19:12
bash script to convert a .zip to a chrome .crx w/o building the zip
#!/bin/bash -e
#
# Purpose: Convert a Chromium extension zip into crx format
# Source: https://developer.chrome.com/extensions/crx
if test $# -ne 2; then
echo "Usage: zip2crx.sh <zip file> <pem path>"
exit 1
fi