Skip to content

Instantly share code, notes, and snippets.

View anaisbetts's full-sized avatar

Ani Betts anaisbetts

View GitHub Profile
namespace GitHub.Helpers
{
abstract class KeyedOperation
{
public string Key { get; set; }
public int Id { get; set; }
public abstract void EvaluateFunc();
}
const string socketAddr = "tcp://localhost:30101";
public IObservable<bool> ConnectOrBecomeAnnounceServer()
{
if (_socket != null)
{
return Observable.Throw<bool>(new Exception("Already connected"));
}
return ConnectToAnnounceServer()
.Catch(BecomeAnnounceServer())
[mergetool "diffmerge"]
cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE
trustExitCode = false
index af1bbbd..2e35501 100644
--- a/Hello LINQ.linq
+++ b/Hello LINQ.linq
@@ -1,6 +1,5 @@
<Query Kind="Statements">
- <Reference Relative="..\References\System.Reactive.dll">..\References\System.Reactive.dll</Reference>
- <Reference Relative="..\References\Microsoft.Reactive.Testing.dll">..\References\Microsoft.Reactive.Testing.dll</Reference>
+ <Reference>&lt;ApplicationData&gt;\LINQPad\Samples\Programming Reactive Extensions and LINQ\System.Reactive.dll</Reference>
<Namespace>System.Reactive</Namespace>
<Namespace>System.Reactive.Linq</Namespace>
using System;
using System.Collections.Generic;
using System.IO;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using ReactiveUI;
namespace GitHub.Core
public IObservable<Result> IssueTheQuery() { /* Blah */ }
Observable.Defer(() => IssueTheQuery())
.Timeout(TimeSpan.FromSeconds(5))
.Retry(3)
.Subscribe(
x => Console.WriteLine("Result was {0}!", x),
ex => Console.WriteLine(ex));
public static class GlobalStuff {
public ILogger TheLog { get; set; }
public IDatabaseProvider TheDatabase { get; set; }
}
public void AppStart()
{
// This is the same as initializing DI container
TheLog = new StdErrLogger();
TheDatabase = new NHibernate();
PS C:\Users\Administrator\Desktop\Windows> C:\Debuggers_x86\kd.exe -z C:\Windows\notepad.exe
Microsoft (R) Windows Debugger Version 6.11.0001.404 X86
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [C:\Windows\notepad.exe]
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
public class ServiceAnnounceServerPolicy : IServiceAnnounce, IEnableLogger
{
public Dictionary<string, string> RegisteredServiceList { get; protected set; }
public Dictionary<string, List<string>> ServiceList { get; protected set; }
readonly IObserver<ServiceSocketMessage> publishSocket;
readonly Subject<Tuple<string, string>> serviceAdded = new Subject<Tuple<string, string>>();
readonly Subject<Tuple<string, string>> serviceRemoved = new Subject<Tuple<string, string>>();
$130,000/yr / 50wks/yr / 40hrs/wk => $65 per hour
OCZ Vertex3 240GB drive = $380. Means it has to save you 380/65 5.84 hours per year to be worth it.
5.84 hours per year / 50wks * 60 minutes => If the SSD saves you 7 minutes per *week* in wasted time, it's worth it. You probably spend 2x that per day if you're building VS