Skip to content

Instantly share code, notes, and snippets.

@error454
error454 / DefaultInput.ini
Last active April 20, 2016 19:00
SteamVR UE4 Motion Controller Mappings
+ActionMappings=(ActionName="MenuButtonLeft",Key=MotionController_Left_Shoulder,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionName="LeftTouchpadPress",Key=MotionController_Left_Thumbstick,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionName="LeftTouchpadTouch",Key=Steam_Touch_0,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionName="LeftGrip",Key=MotionController_Left_Grip1,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionName="LeftTrigger",Key=MotionController_Left_Trigger,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionName="MenuButtonRight",Key=MotionController_Right_Shoulder,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionName="RightTouchpadPress",Key=MotionController_Right_Thumbstick,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionName="RightTouchpadTouch",Key=Steam_Touch_1,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
+ActionMappings=(ActionNam
@error454
error454 / carve.ahk
Last active March 19, 2016 19:24
Some misc video scripts made for processing recorded camera footage and live video streams
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
F1::Run % "D:\Path\to\carve.bat " + Explorer_GetSelection()
Explorer_GetSelection(hwnd="") {
hwnd := hwnd ? hwnd : WinExist("A")
WinGetClass class, ahk_id %hwnd%
if (class="CabinetWClass" or class="ExploreWClass" or class="Progman")
for window in ComObjCreate("Shell.Application").Windows
if (window.hwnd==hwnd)
@error454
error454 / gist:2c72a5b03cca97085eea
Last active February 5, 2016 20:12
UE4 TMap FString Alphanumeric Sort
TMap<FString, FSomeOtherType> MyMap;
MyMap.KeySort([](const FString& A, const FString& B) {
return A.Compare(B, ESearchCase::IgnoreCase) < 0;
});
for (const auto& Entry : MyMap)
{
// Do something with sorted values
Entry.Value;
@error454
error454 / rename.py
Created December 24, 2015 04:49
Quick & Dirty extension renamer
import os
files = os.listdir('.')
for file in files:
s = file.split(".wav.ogg")
if len(s) > 1:
name = s[0] + ".ogg"
os.rename(file, name)
@error454
error454 / gifysubs.py
Created November 12, 2015 22:41
Convert all subfolders to animated gif
import subprocess
import os
import glob
convertpath = 'C:\Program Files\ImageMagick-6.9.2-Q16\convert.exe'
def MakeGif(folder):
gifcommand = [convertpath, '-delay', '10', folder +'/*.jpg', folder + '.gif']
print gifcommand
subprocess.call(gifcommand)
@error454
error454 / snes.asm
Created October 29, 2015 20:01
8051 SNES Controller to PC Joystick Port
;*****************************************************************************************************
; Program file name: snes.asm
;
; CPTR 215 Final Project:
; Language: 8051 Assembly
; Operating system: Windows
; Programmer: Zach Burke
; Date Written: 12/11/01
;
; Description: This program emulates SNES hardware to capture SNES controller
@error454
error454 / lazy-multi-rename.py
Created September 28, 2015 01:57
Rename split archive with screwed up characters
import os
files = os.listdir('.')
files.sort()
num = 1
for file in files:
os.rename(file, "part" + str(num) + ".rar")
num = num + 1
@error454
error454 / index.html
Created May 26, 2015 19:17
Coherent UI Minimap
<html>
<head>
<meta charset="utf-8">
<script src="js/gsap/TweenMax.js"></script>
<script src="js/gsap/TimelineMax.js"></script>
<script src="js/coherent_animations.js"></script>
<script src="js/coherent.js"></script>
<link rel="stylesheet" href="css/main.css">
</head>
@error454
error454 / UnrealBuildHue.py
Last active February 24, 2022 21:07
UE4 Compile Alerts using Philips Hue
from time import sleep
import time
import datetime
import zachhue
import os
import winsound, sys
lastColor = zachhue.office.xy
lastBrightness = zachhue.office.brightness
bIsBuilding = False
@error454
error454 / sketchfab-oculus.js
Created January 8, 2015 03:19
Greasemonkey script to replace Sketchfab model links with dk1/dk2 links
// ==UserScript==
// @name Sketchfab Oculus-izer
// @namespace https://sketchfab.com/
// @description Replace all model links with dk1/dk2 links
// @include https://sketchfab.com/*
// ==/UserScript==
// DK1 users change this to false
var bIsUsingDK2 = true;
var dk1String = '/embed?oculus=1'