This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace GitHub.Helpers | |
| { | |
| abstract class KeyedOperation | |
| { | |
| public string Key { get; set; } | |
| public int Id { get; set; } | |
| public abstract void EvaluateFunc(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [mergetool "diffmerge"] | |
| cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE | |
| trustExitCode = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| index af1bbbd..2e35501 100644 | |
| --- a/Hello LINQ.linq | |
| +++ b/Hello LINQ.linq | |
| [36m@@ -1,6 +1,5 @@[m | |
| <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><ApplicationData>\LINQPad\Samples\Programming Reactive Extensions and LINQ\System.Reactive.dll</Reference> | |
| <Namespace>System.Reactive</Namespace> | |
| <Namespace>System.Reactive.Linq</Namespace> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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>>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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 |