Skip to content

Instantly share code, notes, and snippets.

[Shortcuts]
KisToolSelectOutline=S
KisToolSelectRectangular=B
KisToolTransform=W
KritaSelected/KisToolColorSampler=P; Z
KritaShape/KisToolBrush=Q
KritaShape/KisToolMultiBrush=none
clear=Del; X
deselect=A
duplicatelayer=Ctrl+D
@nothke
nothke / zig.json
Last active August 8, 2024 18:21
My zig snippets for VS Code
{
"While with index": {
"scope": "zig",
"prefix": "whilei",
"body": [
"var ${1:i}: usize = 0;",
"while (${1:i} < $2) {",
"\t$0",
"\t${1:i} += 1;",
"}"
@nothke
nothke / publish-to-itch.py
Created August 1, 2023 17:43
Shakedown Rally itch uploader example
# A script for single [double] click uploading to itch using butler
# by Nothke
#
# Requirements:
# - Installed butler: https://itch.io/docs/butler/
# - butler added to PATH
#
# How to use:
# 1. Put this script in your project folder,
# 2. Edit the script by adding project names and ignores below
@nothke
nothke / strbuff.zig
Created December 1, 2022 18:39
Minimal generic stack-based string buffer for zig
const std = @import("std");
/// Minimal generic stack-based string buffer
pub fn StrBuff(comptime capacity: usize) type {
return struct {
chars: [capacity]u8 = std.mem.zeroes([capacity]u8),
cur: usize = 0,
const Error = error{AttemptingToAppendArrayLargerThanCapacity};
// Pixel (nearest neighbor) shader by nothke
//- Substance 3D Painter Metal/Rough PBR shader
//- ====================================
//-
//- Import from libraries.
import lib-pbr.glsl
import lib-bent-normal.glsl
import lib-emissive.glsl
import lib-pom.glsl
@nothke
nothke / settings.json
Last active July 16, 2024 23:03
My VS Code settings
{
"files.exclude": {
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.meta": true
},
"editor.renderWhitespace": "none",
"csharp.suppressDotnetInstallWarning": true,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Breakable : MonoBehaviour
{
public float mass = 50;
public float impulseThreshold = 10000;
Collider _collider;
@nothke
nothke / windows_update_unity_license_reactivation.md
Last active January 16, 2022 17:02
How to reactivate your Unity license when you update/change Windows version

Valid as of January 16th, 2022

  • Shutdown Unity Hub
  • Find the license .ulf file and delete it, it will typically be: C:\ProgramData\Unity\Unity_v5.x.ulf
  • Go to your account at Unity ID
  • Navigate to My Seats > scroll down to activations
  • Select your previous activation and remove it (note that this will not delete your license or seats! It will just deactivate the connection to your old-windows-version machine)
  • Now open Unity Hub and it will offer you to activate a free license, just cancel the prompt and proceed to hub main screen
  • Click on "Manage Licenses > Activate New License > Activate with a serial number"
  • Now copy your license serial number from Unity ID account's "My Seats" page, and that should be it!
//#include <iostream>
#include "raylib.h"
#include "rlgl.h"
#include "raymath.h"
Vector3 GetForwardFromMatrix(const Matrix m)
{
return { m.m0, m.m1, m.m2 };
}
@nothke
nothke / xfont_main.cpp
Last active September 19, 2021 00:07
Font experiment, loading from MBFont
#include "pch.h"
#include "noclip_controller.h"
struct FChar
{
char id;
int x, y;
int width, height;