Skip to content

Instantly share code, notes, and snippets.

View orels1's full-sized avatar
🎮
Making the world better, one texel at a time

orels1 orels1

🎮
Making the world better, one texel at a time
View GitHub Profile
@orels1
orels1 / ORLShaderInspectorUtils.cs
Last active November 24, 2022 21:07
Converting inline material prop conditions into a boolean result (the dirty way)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
namespace ORL
{
public class ORLShaderInspectorUtils
@orels1
orels1 / README.md
Last active March 26, 2022 23:12
A simple go-based program to grab and export all the tracks from a single spotify playlist

For this program to work - you'll need to get a spotify auth token, which you can get via many cli and UI tools, including things like spotify-token. This program does not cover getting the token for you

Made as a way to learn bubbletea TUI library

CleanShot 2022-03-27 at 03 11 16

@orels1
orels1 / MatCapTechniques.shader
Created January 29, 2022 08:44 — forked from bgolus/MatCapTechniques.shader
Showing multiple matcap techniques, including a proposed improved method that's no more expensive than the usual fix if you're starting with the world position and world normal.
Shader "Unlit/MatCap Techniques"
{
Properties
{
[NoScaleOffset] _MatCap ("MatCap", 2D) = "white" {}
[KeywordEnum(ViewSpaceNormal, ViewDirectionCross, ViewDirectionAligned)] _MatCapType ("Matcap UV Type", Float) = 2
}
SubShader
{
Tags { "RenderType"="Opaque" }
@orels1
orels1 / batch_unwrap.py
Created June 13, 2021 22:37
Blender Addon: Batch Smart Unwrap
import bpy
bl_info = {
"name": "Batch Smart Unwrap",
"description": "Unwraps all the selected objects one by one using Smart UV Project.",
"author": "orels1 and Calo on blender StackExchange",
"version": (1, 0),
"blender": (2, 90, 0),
"category": "Object",
}
{
"list": [
{
"name": "sao"
}
]
}
cssModules: {
localIdentName: '[local]_[hash:base64:5]'
}
@orels1
orels1 / pico-8.md
Last active October 10, 2017 07:48
PICO-8 Starter Pack (via @irdumb)
// async/await error catcher
const catchAsyncErrors = fn => (
(req, res, next) => {
const routePromise = fn(req, res, next);
if (routePromise.catch) {
routePromise.catch(err => next(err));
}
}
);
app.use((err, req, res, next) => {
switch (err.message) {
case 'NoCodeProvided':
return res.status(400).send({
status: 'ERROR',
error: err.message,
});
default:
return res.status(500).send({
status: 'ERROR',