Skip to content

Instantly share code, notes, and snippets.

View txdv's full-sized avatar

Andrius Bentkus txdv

  • Lithuania, Vilnius
View GitHub Profile
@txdv
txdv / Makefile
Last active November 16, 2016 07:15
Example
main.exe: main.cs
mcs /unsafe main.cs
@txdv
txdv / exceptions.cs
Last active February 15, 2017 18:14
Can not yield from finally block
using System;
using System.Collections.Generic;
public class MainClass
{
public static IEnumerable<string> Actions()
{
try {
yield return "try";
} catch (Exception) {
@txdv
txdv / Main.cs
Created April 3, 2017 08:23
Hello World
public class Main
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
using System;
public static class Main
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
@txdv
txdv / Makefile
Last active March 12, 2021 08:58 — forked from IridescentRose/uuid.zig
A simple UUID v4 Generator
uuid: main.zig
zig build-exe --strip --single-threaded main.zig
mv main uuid
run: uuid
./uuid
@txdv
txdv / Puzzle06.scala
Created December 6, 2022 08:28
aoc 2022 puzzle06
import Converters._
object Puzzle06 extends Runnable {
def find(line: String, count: Int): Int = {
val result = line.sliding(count).zipWithIndex.find { case (e, i) =>
e.toSet.size == count
} getOrElse {
???
}