Skip to content

Instantly share code, notes, and snippets.

View hsandt's full-sized avatar

Hyper Sonic hsandt

View GitHub Profile
@Zodt
Zodt / Program.cs
Last active October 3, 2022 05:32
C# Enumerate like in python through Extensions class
// C#9
using System;
using System.Collections.Generic;
foreach (var (value, index) in 5..10)
{
Console.WriteLine($"Value = {value.ToString()}, Index = {index.ToString()}");
}
public static class RangeExtensions
@neilpopham
neilpopham / convert.php
Last active September 4, 2018 06:43
Converts PICO-8 map and sprite flag data for use with TIC-80, and converts a TIC-80 map file to p8 __map__ format.
<?php
const TIC_MAP_WIDTH = 240;
const TIC_MAP_HEIGHT = 136;
const PICO_MAP_WIDTH = 128;
const PICO_MAP_HEIGHT = 32;
function tic80_map_file_to_p8($strMapFile, $strPicoFile)
{
@frarees
frarees / MinMaxSliderAttribute.cs
Last active July 8, 2024 17:26
MinMaxSlider for Unity
// https://frarees.github.io/default-gist-license
using System;
using UnityEngine;
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class MinMaxSliderAttribute : PropertyAttribute
{
public float Min { get; set; }
public float Max { get; set; }
@ssokolow
ssokolow / install.sh
Last active April 9, 2019 20:31
Simple XDG Install Script for Linux Games
#!/bin/sh
#
# Simple XDG Install Script for Linux Games
#
# Features:
# - Communicates with the desktop via the xdg-utils vendor integration scripts.
# (No need to upgrade if the implementation details change.)
# - Icons are resolved via the desktop theming system, granting theme
# developers the ability to provide customized versions which preserve the
# overall system aesthetic.