Skip to content

Instantly share code, notes, and snippets.

View nycdotnet's full-sized avatar

Steve Ognibene nycdotnet

View GitHub Profile
@nycdotnet
nycdotnet / README.md
Created October 22, 2025 01:44
GDScript Notes

GDScript

Notes are as of Godot 4.5.1 (October 2025)

Empty string is falsy, non-empty string is truthy.

 # prints "b" only.
if "":
  print("a")
if "x":
@nycdotnet
nycdotnet / Program.cs
Last active July 14, 2025 20:44
Program to inventory real .NET DLL versions
using System.Reflection;
namespace BindingRedirectHelper;
// I am a .NET 8+ console app.
internal class Program
{
static void Main(string[] args)
{
if (args.Length != 1)
@nycdotnet
nycdotnet / #Angular CLI commands.md
Last active July 25, 2023 15:52
Angular CLI commands
ng new project-name-goes-here

This will create a new folder and set up an empty project there.

ng serve --open

Will serve the application and open the default web browser to it.

Pattern Matching

List and similar:

This is null safe for Items in this example. 40x Faster than using ?.Any() in a microbenchmark when Items is not null but could be empty. In cases where the list will typically be null, ?.Any() measured about 10x faster, but these are all sub-nanosecond measurements and neither has any allocations.

    public class Foo
    {
        public List<int>? Items { get; set; }
  
@nycdotnet
nycdotnet / #Ruby and Rails tricks.md
Last active July 14, 2023 13:31
Useful Ruby Snippets

This repo contains some code snippets that I've found useful related to Ruby and Rails

@nycdotnet
nycdotnet / Homebrew.md
Last active May 25, 2023 18:17
Homebrew Packages

These are the Homebrew packages I have used:

https://brew.sh

brew install --cask visual-studio-code
brew install --cask github
brew install --cask firefox
brew install gh
brew install docker
@nycdotnet
nycdotnet / embed.ps1
Last active December 5, 2019 16:32
Embed a file in a PowerShell script
param (
[Parameter(Mandatory=$true)][string]$sourceFile,
[string]$outputFile=""
)
$MAX_LINE_LENGTH = 16000000;
if ($outputFile -eq "") {
$outputFile = '{0}.ps1' -f ($sourceFile)
}
@nycdotnet
nycdotnet / Program.cs
Created May 29, 2019 12:51
Protobuf Example
using ProtobufExample.Protos;
using System;
namespace ProtobufExample
{
class Program
{
static void Main(string[] args)
{
var product = new Product { Id = 2, Description = "Fun product" };
@nycdotnet
nycdotnet / chocolatey.md
Last active July 13, 2025 13:55
Chocolatey Packages I use

I like to use the following Chocolatey packages

docker-desktop
microsoft-windows-terminal
git.install
github-desktop
vscode
paint.net
@nycdotnet
nycdotnet / Program.cs
Created April 30, 2019 20:47
Autofac Demo
using Autofac;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Primitives;
using System;
using System.Collections.Generic;
using System.Threading;
// You must add the `Autofac` and `Microsoft.Extensions.Configuration` NuGet packages for this to work
namespace AutofacDemo