(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| ############################### | |
| # Core EditorConfig Options # | |
| ############################### | |
| root = true | |
| # All files | |
| [*] | |
| indent_style = space | |
| # Code files |
| public abstract class ValueObject<T> | |
| where T : ValueObject<T> | |
| { | |
| public override bool Equals(object obj) | |
| { | |
| var valueObject = obj as T; | |
| if (ReferenceEquals(valueObject, null)) | |
| return false; | |
| As requested on reddit, here is some information about how i made a "realtime" dashboard. | |
| Flow | |
| === | |
| 1. a task grab data with a scheduled job. It saves the data in json in two places: one static folder, which overwrite existing data, and in a temporary folder, to be a new "event". | |
| 2. a websocket deamon (websocketd) run a powershell script listening to changes in the temporary folder. When a change happens, the new data is read and sent thru the websocket | |
| 3. the frontend update the data with what came thru the websocket. If the browser does not support websocket, it will instead pull the data from time to time | |
| Grabbing Data and saving as JSON |
| # see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
| # core | |
| brew install coreutils | |
| # key commands | |
| brew install binutils | |
| brew install diffutils | |
| brew install ed --default-names | |
| brew install findutils --with-default-names |
| void Main() | |
| { | |
| var xaml = @" | |
| <UserControl | |
| xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" | |
| xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"" | |
| xmlns:sys=""clr-namespace:System;assembly=mscorlib""> | |
| <UserControl.Resources> | |
| <Style TargetType=""{x:Type Button}""> | |
| <Setter Property=""Height"" Value=""32"" /> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| Util.RawHtml(@"<script type=""text/javascript"" src=""https://www.google.com/jsapi""></script>").Dump(); | |
| Util.RawHtml(@"<div id=""chart_div"" style=""width: 1024px; height: 1024px;""></div>").Dump(); | |
| var script = new StringBuilder(); | |
| script.AppendLine(@" | |
| <script type=""text/javascript""> | |
| google.load(""visualization"", ""1"", {packages:[""corechart""]}); | |
| google.setOnLoadCallback(drawChart); | |
| function drawChart() { |
Install Package Control for easy package management.
Ctrl+`
| (* | |
| This script analyzes the dependencies between top level types in a .NET Assembly. | |
| It is then used to compare the dependency relationships in some F# projects with those in some C# projects. | |
| Note that no attempt has been made to optimize the code yet! | |
| REQUIRES: | |
| * Mono.Cecil for code analysis | |
| From http://www.mono-project.com/Cecil#Download |
| void Main() | |
| { | |
| string path = Path.GetFullPath(@"C:\Users\Username"); | |
| System.IO.DirectoryInfo di = new DirectoryInfo(path); | |
| var query = di.GetFiles("*.*",SearchOption.TopDirectoryOnly).IncludeFileExtensions("*.asp").SearchFileContents("searchterm"); | |
| query.Dump(); | |
| } | |
| public static class FileIOExtensions |