Skip to content

Instantly share code, notes, and snippets.

@katas94
katas94 / WorldSpaceUIDocument.cs
Created October 27, 2021 19:11
Custom Unity component to create a world-space UIToolkit panel
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.EventSystems;
using UnityEngine.Rendering;
namespace Katas.Experimental
{
public class WorldSpaceUIDocument : MonoBehaviour, IPointerMoveHandler, IPointerUpHandler, IPointerDownHandler,
ISubmitHandler, ICancelHandler, IMoveHandler, IScrollHandler, ISelectHandler, IDeselectHandler, IDragHandler
@bartwttewaall
bartwttewaall / Unity3D_InputFieldSetFocus.cs
Created July 22, 2019 08:39
Use Unity3D's EventSystem to set or unset focus on a UI element
public TMP_InputField inputField;
float focusReleaseTime;
float focusReleaseCooldown = 0.1f;
public bool HasFocus () {
return EventSystem.current.currentSelectedGameObject == inputField.gameObject;
}
public void SetFocus (bool value) {
if (value && !inputField.isFocused) {
@ForeverZer0
ForeverZer0 / ExtractTarGz.cs
Last active February 5, 2024 10:36
Use pure C# to extract .tar and .tar.gz files
using System;
using System.IO;
using System.IO.Compression;
using System.Text;
namespace TarExample
{
public class Tar
{
@huqi
huqi / trial.key
Created April 11, 2015 09:01
Beyond Compare 4 license for Mac
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
@michaelbartnett
michaelbartnett / LICENSE.txt
Last active October 17, 2022 10:29
Tuple implementation for use with Unity3d
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: