start new:
tmux
start new with session name:
tmux new -s myname
| # This is a super **SIMPLE** example of how to create a very basic powershell webserver | |
| # 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity. | |
| # Http Server | |
| $http = [System.Net.HttpListener]::new() | |
| # Hostname and port to listen on | |
| $http.Prefixes.Add("http://localhost:8080/") | |
| # Start the Http Server |
| //Reader Monad and its extension class to give it SelectMany(bind/flatMap) capabilities for use in LINQ queries | |
| public static class ReaderMonadExt | |
| { | |
| public static ReaderMonad<T, C> SelectMany<T, A, B, C>(this ReaderMonad<T, A> rm, Func<A, ReaderMonad<T, B>> bindf, Func<A, B, C> select) | |
| { | |
| return new ReaderMonad<T, C>(t => | |
| { | |
| var a = rm.Run(t); | |
| return select(a, bindf(a).Run(t)); | |
| }); |