Skip to content

Instantly share code, notes, and snippets.

View theorigin's full-sized avatar

Andy Robinson theorigin

View GitHub Profile
@mocella
mocella / azure-pipelines.yml
Created November 9, 2022 13:37
Azure Pipeline Step to Scan for .NET Dependency CVEs
- task: PowerShell@2
displayName: "NuGet packages vulnerabilities scan"
continueOnError: false
inputs:
filePath: '$(Build.SourcesDirectory)/nuget-vunerability-build-fail-report.ps1'
arguments: '''$(Build.SourcesDirectory)'' ''$(SolutionName)'''
pwsh: true
@nathonius
nathonius / Startup.cs
Last active May 15, 2020 14:32
UseWebpackDevMiddleware
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
if (Dependencies.DevOptions.UseWebpackDevMiddleware) // comes from appsettings
{
#pragma warning disable CS0618 // Type or member is obsolete
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
{
@straker
straker / README.md
Last active April 30, 2024 02:04
Basic Tetris HTML and JavaScript Game

Basic Tetris HTML and JavaScript Game

This is a basic implementation of the game Tetris, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

@RickardAhlstedt
RickardAhlstedt / Exit.cs
Created July 24, 2019 07:17 — forked from IronMonk-UK/Exit.cs
The C# code for the Text Adventure
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TextAdventure
{
class Exit
{
@kjnilsson
kjnilsson / async_consumer.cs
Last active January 24, 2021 07:17
RabbitMQ .NET client async consumer example
using System;
using System.Threading.Tasks;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
@IronMonk-UK
IronMonk-UK / Exit.cs
Created March 7, 2016 13:13
The C# code for the Text Adventure
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TextAdventure
{
class Exit
{
@georgepowell
georgepowell / Program.cs
Last active January 8, 2022 11:45
Roman Numerals converter in C#. Run as a console application from Visual Studio. The 'Romanise' function is where the magic happens.
using System;
namespace RomanNumerals
{
class Program
{
// Create rules in descending order
static Rule[] Rules = new Rule[]
{
new Rule(1000, "M"),
internal static IEnumerable<string> ReadLines(this string s)
{
string line;
using (var sr = new StringReader(s))
while ((line = sr.ReadLine()) != null)
yield return line;
}
@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>