Skip to content

Instantly share code, notes, and snippets.

@nin-jat
nin-jat / Modal.cs
Last active September 9, 2019 16:47
Simple Unity Modals
// This little ModalManager script was created by Those45Ninjas.
// Feel free to improve it.
// Original gist (with pictures):
// https://gist.github.com/Those45Ninjas/f3f75f927697997ff35f97edb3bafc76
// Inherit, modify or replace, you choose. I like lots of components but you do you fam.
using UnityEngine;
@nin-jat
nin-jat / wacom-bamboo-cte-650.sh
Last active January 30, 2020 05:59
Dual 16:9 monitor configuration for wacom bamboo tablet.
# Created by 45Ninjas
# https://gist.github.com/Those45Ninjas/31b69c619502b0c704985c75578a7fc1
# This script configures the Wacom BambooFun 6x8 Graphics tablet to only output on
# the primary display along with forcing a 16x9 aspect ratio.
display="HEAD-0"
# Use xrandr or nvidia control panel to list displays.
@nin-jat
nin-jat / ColourUtils.cs
Last active May 13, 2019 14:56
Parse HTML/hex colours to a color object in C#
// Created by 45Ninjas.
// Feel free to use this, credit would be nice.
using System;
using OpenTK;
using System.Globalization;
namespace KauRock.Utils {
public static class ColourUtils {
@nin-jat
nin-jat / Cat.cs
Last active November 16, 2022 20:14
This shows a cat in your console.
/// <summary>
/// This program draws a cute cat on your console.
/// View more at the gist over here.
/// https://gist.github.com/Those45Ninjas/7a18755b07aff61c4f37c1c27de449c6
///
/// This cute cat was sourced from textart4u.
/// http://textart4u.blogspot.com/2013/02/cute-cat-face-ascii-text-art.html
///
/// Code written by Those45Ninjas
/// </summary>
@nin-jat
nin-jat / ControllerMenu.cs
Created January 10, 2019 12:51
vive radial menus
// Created by Tom Parker (Those45Ninjas).
// This code was used in https://www.youtube.com/watch?v=n7lzkyXVxJ8
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Events;
using UnityEngine.UI;
public class ControllerMenu : MonoBehaviour
{
/*
Original author: Christopher Mark Jones
https://www.cjonesdev.com/blog/unity-blender-and-instancing-models
Slightly modified by me, works with unity 2018.2
*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
@nin-jat
nin-jat / record.bat
Last active January 6, 2018 04:00
Desktop time lapses without dealing with thousands of images or ridiculously large files.
@echo off
rem This simple batch script will record your desktop at 4 frames every second
rem and stuff it into a 60 fps video.
rem Essentially, desktop time lapses without dealing with thousands of images
rem or ridiculously large files.
rem You will have to modify this script if you don't have a 1440p display as
rem your primary display.
rem iterate over each mkv file in the mkv subdirectory
rem and run the ffmpeg command to convert it.
for %%f in (mkv\*.mkv) do (
ffmpeg -n -i mkv\%%~nf.mkv %%~nf.mp4
)
pause
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
public enum Direction { Up, Front, Right, Back, Left, Down };
[Serializable]
public struct VoxPos: IEquatable<VoxPos>, IEqualityComparer<VoxPos> {

The code behind This unity inspector.

Sorry for the missing comments, I'll add them later Ha, lol, that's not going to happen

Song: Like It's Over by Jia Wolf.