Paweł Iżycki

.NET developer, fan of automation and backend world.


DevoWeek 07/05/2018

07 May 2018 » DevoWeek, LinqPad, C#

I was on vacation, that’s why there was a break. I’m back and DevoWeek is back too.

This week:

  • A JSON Data Context Driver for LINQPad - If you have to run some queries against large JSON object and you like LinqPad, this driver is best choice for you! Here you have manual how to use *.lpx file, downloaded from GitHub releases page.
  • Tee (command) - tee is normally used to split the output of a program so that it can be both displayed and saved in a file.

    Example in C#

    void Main()
    {
      DateTime actualTime = DateTime.Now.Tee(time => Console.WriteLine(time));
        
      // it will print actual time and assaign it to `actualTime` variable
    }
    
    public static class TeeExtension{
      public static T Tee<T>(this T @target, Action<T> fn) {
        if (@target == null) 
          throw new ArgumentNullException(nameof(@target));
    
        fn(@target);
    
        return @target;
      }
    }
    
  • FiraCode - Font designed for programmers, it turns !=, =>, -> and other specific for C-like or functional languages to more be more human readable.
  • Rico’s cheatsheets