Skip to content

Instantly share code, notes, and snippets.

View bison--'s full-sized avatar
😞
sad

bison bison--

😞
sad
View GitHub Profile
@nitaku
nitaku / README.md
Last active November 18, 2022 05:37
Tablet test (desktop)

And now for something completely different: a Windows desktop application! Open this gist for the code.

This example uses a python wrapper around Wacom's Wintab/Feel driver to read a Wacom stylus input, and draws a representation of it onto a Tkinter canvas. Each circle represents a point, and its radius is proportional to the pressure of the stylus.

To run the application, you will need: a (Wacom?) tablet or a tablet PC, Microsoft Windows (I tried it with 8.1), Python 3.3, cgkit 2, the code from this repo. To actually run it, open a command prompt where you put the python files, then execute:

python test.py
/*!
* jQuery JavaScript Library v2.1.1pre
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
@gitaarik
gitaarik / git_submodules.md
Last active March 3, 2025 12:54
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@bitbutter
bitbutter / TransparentBackgroundScreenshotRecorder.cs
Last active February 1, 2025 23:54
Rendering screenshots from Unity3d with transparent backgrounds
using UnityEngine;
using System.Collections;
using System.IO;
/*
Usage:
1. Attach this script to your chosen camera's game object.
2. Set that camera's Clear Flags field to Solid Color.
3. Use the inspector to set frameRate and framesToCapture

Git Cheat Sheet

Commands

Getting Started

git init

or

@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
using UnityEngine;
using System.Collections;
using UnityEngine.Events;
namespace Cluster {
public class CollisionCall : MonoBehaviour {
public LayerMask layerMask = -1;
@tophermade
tophermade / SteamWorkshop.cs
Last active December 11, 2023 12:52
Unity script for accessing the Workshop with the steamworks.net C# wrapper
using UnityEngine;
using System.Collections.Generic;
using Steamworks;
/// <summary>
/// This class was created by Vitor Pêgas on 01/01/2017
/// From http://answers.unity3d.com/questions/1282772/steamworksnet-and-steam-workshop.html
/// Added here so it doesn't disappear
/// Requires https://steamworks.github.io/
/// </summary>
@GLMeece
GLMeece / latency_numbers.md
Last active February 22, 2025 10:46
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@ffyhlkain
ffyhlkain / ReferenceFinder.cs
Last active February 19, 2025 05:48
A reference finder for assets in a #Unity3d project.
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace FoundationEditor.Editor.ReferenceFinder
{