Skip to content

Instantly share code, notes, and snippets.

View lennartb-'s full-sized avatar

Lennart Brüggemann lennartb-

  • Scopeland Technology
  • Berlin, Germany
View GitHub Profile
@lennartb-
lennartb- / Program.cs
Created December 3, 2020 11:11
Advent Of Code 2020 - Day 3
using System;
namespace adventofcode
{
class Program
{
static void Main()
{
var input = System.IO.File.ReadAllLines("input.txt");
@lennartb-
lennartb- / cws.snippet
Created October 12, 2016 06:53
Visual Studio C# Snippet to insert Console.WriteLine with basic String interpolation syntax
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>cws</Title>
<Shortcut>cws</Shortcut>
<Description>Code snippet for Console.WriteLine with String interpolation</Description>
<Author>Microsoft Corporation/lennartb</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
@lennartb-
lennartb- / cws.snippet
Created October 12, 2016 06:53
Visual Studio C
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>cws</Title>
<Shortcut>cws</Shortcut>
<Description>Code snippet for Console.WriteLine with String Interpolation</Description>
<Author>Microsoft Corporation/lennartb</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
@lennartb-
lennartb- / gist:8239571
Created January 3, 2014 15:20
Switches the active display to the inactive and vice verse
public void SwitchActiveInactive() {
GetDisplayInfo();
// Negative x numbers = left
ddInactive.dmPosition.x = -1920;
ddInactive.dmPosition.y = 0;
ddInactive.dmFields = DM.Position;
var res = ChangeDisplaySettingsEx(
szInactiveDeviceName,
ref ddInactive,
IntPtr.Zero,
@lennartb-
lennartb- / GameOfLife.cs
Last active May 17, 2023 03:39
Conway's Game of Life in C# (Console App) with basic arrays and without any fancy complicated stuff. No error checking included.
using System;
namespace GameOfLife {
public class LifeSimulation {
private int Heigth;
private int Width;
private bool[,] cells;
/// <summary>