Skip to content

Instantly share code, notes, and snippets.

View enusbaum's full-sized avatar

Eric P. Nusbaum enusbaum

View GitHub Profile
@enusbaum
enusbaum / Oscillator.cs
Created March 9, 2018 12:22
Oscillator Class in C# to pulse an AutoResetEvent at a sub-millisecond rate
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
namespace TimerTest
{
/// <summary>
/// Oscillator class to pulse the specified AutoResetEvents at a higher frequency
/// than the minimum resolution of most system timers of 1ms
@mandiwise
mandiwise / Count lines in Git repo
Last active December 27, 2025 13:49
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l