Skip to content

Instantly share code, notes, and snippets.

View dasannikov's full-sized avatar

Dmitrii Sannikov dasannikov

View GitHub Profile
@define-private-public
define-private-public / HttpServer.cs
Last active February 17, 2026 09:04
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
std = "max"
files['.luacheckrc'].global = false
unused_args = false
globals = {
"sys",
"go",
"gui",
"label",
"render",
@FullStackForger
FullStackForger / .gitattributes
Last active July 5, 2023 17:59 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# Unity
*.cginc text
*.cs diff=csharp text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
anonymous
anonymous / -
Created February 17, 2018 12:02
System: Host: dasmint Kernel: 4.13.0-32-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm Distro: Linux Mint 18.3 Sylvia
Machine: Mobo: ASRock model: K10N78D Bios: American Megatrends v: P1.40 date: 11/20/2009
CPU: Dual core AMD Athlon II X2 245 (-MCP-) cache: 2048 KB
flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 11654
clock speeds: max: 2913 MHz 1: 2913 MHz 2: 2913 MHz
Graphics: Card: NVIDIA GK208 [GeForce GT 640 Rev. 2] bus-ID: 02:00.0 chip-ID: 10de:1282
Display Server: X.Org 1.18.4 drivers: nvidia (unloaded: fbdev,vesa,nouveau)
Resolution: 1920x1080@60.00hz
GLX Renderer: GeForce GT 640/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 384.111 Direct Rendering: Yes
@Maxstupo
Maxstupo / ObjectPool.cs
Last active May 21, 2020 10:46
A generic object pool in C#
using System;
using System.Collections.Generic;
//TODO: Implement the IDisposable interface to allow pooled objects to be freed by the using keyword.
public interface IPoolable {
void ResetObject();
}
public abstract class ObjectPool<T> where T : IPoolable {
@CloudyWater
CloudyWater / Starfield.shader
Created February 23, 2018 03:31
Conversion of ShaderToy to Unity Shader
Shader "Starfield"
{
Properties
{
_iMouse ("iMouse", Vector) = (0,0,0,0)
_Iterations ("Iterations", int) = 17
_Formuparam ("Formuparam", float) = .53
_Steps ("Steps", int) = 20
_StepSize ("StepSize", float) = .1
_Zoom ("Zoom", float) = .8
@hasanbayatme
hasanbayatme / MinMax.cs
Last active January 5, 2026 03:13
Unity Min Max Slider Implementation
using System;
using UnityEngine;
[Serializable]
public struct MinMax
{
[SerializeField]
private float min;
[SerializeField]
using System;
using System.Text;
//----------------------------------------------------------------------------
// Using:
//
// private UpdateCheckString<int, int> _updateCheck;
// ...
// if(_updateCheck.IsChanged("Time now: {0}:{1}", DateTime.UtcNow.Minute, DateTime.UtcNow.Second))
// TextObject.text = _updateCheck;
@wakita
wakita / Makefile
Last active July 21, 2023 08:53
Metal compute shader example
SDK = xcrun -sdk macosx
all: compute.metallib compute
compute.metallib: Compute.metal
# Metal intermediate representation (.air)
$(SDK) metal -c -Wall -Wextra -std=osx-metal2.0 -o /tmp/Compute.air $^
# Metal library (.metallib)
$(SDK) metallib -o $@ /tmp/Compute.air
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active July 5, 2026 10:40
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).