Skip to content

Instantly share code, notes, and snippets.

View adamralph's full-sized avatar
🤗
Living the dream

Adam Ralph adamralph

🤗
Living the dream
View GitHub Profile
@adamralph
adamralph / list-video-duration.linq
Last active September 28, 2017 16:18
List duration of video files
<Query Kind="Statements">
<NuGetReference>Xabe.FFmpeg</NuGetReference>
<Namespace>Xabe.FFmpeg</Namespace>
</Query>
Util.AutoScrollResults = true;
FFbase.FFmpegDir = @"C:\ffmpeg-3.3.3-win64-static\bin";
Directory.EnumerateFiles(@"C:\vids")
@adamralph
adamralph / HashBus.DeDup-Program.cs
Created March 31, 2017 12:21
A hack to remove dups from HashBus, from before we fixed the app to strip them out on the way in
namespace HashBus.DeDup
{
using System;
using System.Linq;
using System.Threading.Tasks;
using HashBus.ReadModel;
using HashBus.ReadModel.MongoDB;
using MongoDB.Driver;
class Program
@adamralph
adamralph / inspectcode-error.txt
Created November 14, 2016 13:14
Intermittent error in InspectCode in Resharper Command Line tools
Running '"./.resharper/inspectcode.exe" --profile=./src/NServiceBus.RabbitMQ.sln.DotSettings --output=./src/NServiceBus.RabbitMQ.sln.inspections.xml ./src/NServiceBus.RabbitMQ.sln'...
JetBrains Inspect Code 2016.2.2
Running in 64-bit mode, .NET runtime 4.0.30319.42000 under Microsoft Windows NT 6.2.9200.0
Custom settings layer is mounted. Used file C:\code\Particular\NServiceBus.RabbitMQ\src\NServiceBus.RabbitMQ.sln.DotSettings
Asking for writer lock unexpected. File changes:
--- EXCEPTION #1/1 [LoggerException]
Message = "Asking for writer lock unexpected. File changes:"
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
#!/usr/bin/env bash
# options
set -e
set -o pipefail
set -x
# determine cache dir
if [ -z $XDG_DATA_HOME ]; then
NUGET_CACHE_DIR=$HOME/.local/share
Config.WebGreeting = "Hello World from web!";
Config.WebValediction = "Goodbye World from web!";
[Fact]
public async Task SillyTest()
{
var foo = await Foo();
var task = SomeMockMethodOrWhateverWhichReturnsATaskWhichNeverCompletes();
return task;
}
@adamralph
adamralph / hardware.md
Last active October 20, 2018 06:30
My hardware

Workstation (Dec 2015)

  • Dell Precision T5810
  • Intel Xeon E5-1650 v3 (3.8GHz, 12 threads)
  • 32GB (1x32GB) DDR4-2133 ECC RAM
  • 512GB M.2 (PCI Express) SSD (Samsung SSD 950 Pro)
  • 2x1TB HDD
  • APC BR1500LCDI, Back-UPS RS
  • nVidia Quadro K2200 (2xDisplayPort 1.2)
  • nVidia Quadro K620 (1xDisplayPort 1.2)
C:\code\Particular\NServiceBus.RabbitMQ-Issue-102\Sample\bin\Debug [master]> .\Sample.exe
2015-10-05 18:17:18.520 INFO DefaultFactory Logging to 'C:\code\Particular\NServiceBus.RabbitMQ-Issue-102\Sample\bin\Debug\' with level Info
2015-10-05 18:17:18.565 INFO NServiceBus.Persistence.PersistenceStartup Activating persistence 'InMemoryPersistence' to provide storage for 'NServiceBus.Persistence.StorageType+Sagas' storage.
2015-10-05 18:17:18.587 INFO NServiceBus.Persistence.PersistenceStartup Activating persistence 'InMemoryPersistence' to provide storage for 'NServiceBus.Persistence.StorageType+Timeouts' storage.
2015-10-05 18:17:18.607 INFO NServiceBus.Persistence.PersistenceStartup Activating persistence 'InMemoryPersistence' to provide storage for 'NServiceBus.Persistence.StorageType+Subscriptions' storage.
2015-10-05 18:17:18.626 INFO NServiceBus.Persistence.PersistenceStartup Activating persistence 'InMemoryPersistence' to provide storage for 'NServiceBus.Persistence.StorageType+Outbox' storage.
2015
@adamralph
adamralph / gist.csx
Created July 30, 2015 19:46
Sample script for testing scriptcs Gist module against https://gist.github.com/ryanrousseau/0dca8b3a74958f82406a
#gist 0dca8b3a74958f82406a
var pinger = new Pinger();
pinger.Ping();
Console.WriteLine("done!");
@adamralph
adamralph / install.all.scriptpacks.cmd
Created March 28, 2015 11:37
A batch file to install all known scriptcs script packs
call scriptcs -install DotNetBuild.Runner.ScriptCs -pre
call scriptcs -install Fitter.ScriptCs -pre
call scriptcs -install Glimpse.ScriptCs -pre
call scriptcs -install MpnsTester -pre
call scriptcs -install ScriptCs.Adder -pre
call scriptcs -install ScriptCs.ArcGIS -pre
call scriptcs -install ScriptCs.Arduino -pre
call scriptcs -install ScriptCs.AzureManagement -pre
call scriptcs -install ScriptCs.AzureMediaServices -pre
call scriptcs -install ScriptCs.AzureMobileServices -pre