alias dni='curl https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.sh -o ~/.dotnet/dotnet-install.sh -s | chmod +x ~/.dotnet/dotnet-install.sh | ~/.dotnet/dotnet-install.sh'
dni --help
| @page "/testform" | |
| @using Microsoft.Extensions.Logging | |
| @using System.ComponentModel.DataAnnotations | |
| @inject NavigationManager Navigation | |
| @inject LinkGenerator LinkGenerator | |
| @inject ILogger<TestForm> Logger | |
| <EditForm Model="Model" OnSubmit="Submit" FormName="OrderCharger"> | |
| <label> | |
| Identifier: |
| type System.Int32 with | |
| member x.DisplayWithSuffix() = | |
| let f = x.ToString() | |
| let defaultVal = f + "th" | |
| let mutable result = "" | |
| result <- if f.EndsWith("11") then f + "th" else defaultVal | |
| result <- if f.EndsWith("12") then f + "th" else defaultVal | |
| result <- if f.EndsWith("13") then f + "th" else defaultVal | |
| result <- if f.EndsWith("1") then f + "st" else defaultVal |
| type LogLevel = | |
| | Error | |
| | Warning | |
| | Info | |
| let log (level:LogLevel) message = // LogLevel -> string -> unit | |
| printfn "[%A]: %s" level message | |
| () | |
| log Error "Curried function" |
alias dni='curl https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.sh -o ~/.dotnet/dotnet-install.sh -s | chmod +x ~/.dotnet/dotnet-install.sh | ~/.dotnet/dotnet-install.sh'
dni --help
| -- Message #0 | |
| ----------------------------------------------------------------- | |
| ETW collector internal error | |
| ETW Collector error | |
| [location] = c:\build agent\work\9f8acdb7e480c131\profiler\kernel\windows\native\solution\core\src\bridges\etw\etw_bridge.cpp(101) | |
| [function] = enum jb::profiler::etw_bridge::loop_executor::state __cdecl jb::profiler::etw_bridge::poll_etw_state(void) | |
| [hresult] = adab0000 | |
| ----------------------------------------------------------------- |
| public static class Extensions | |
| { | |
| public static dynamic ToDynamic(this object value) | |
| { | |
| if (value.IsListOrArray ()) { | |
| var list = new List<ExpandoObject> (); | |
| IEnumerable enumerable = value as IEnumerable; | |
| foreach (object o in enumerable) { | |
| list.Add (o.ToDynamic ()); |
| BITS 32 | |
| org 0x08048000 | |
| ehdr: ; Elf32_Ehdr | |
| db 0x7F, "ELF", 1, 1, 1, 0 ; e_ident | |
| times 8 db 0 | |
| dw 2 ; e_type | |
| dw 3 ; e_machine | |
| dd 1 ; e_version |
| public static class HttpClientExtensions | |
| { | |
| public static T Get<T>(this HttpClient client, string url) | |
| { | |
| var response = client.GetAsync(url).Result; | |
| var content = response.Content.ReadAsStringAsync().Result; | |
| return JsonConvert.DeserializeObject<T>(content); | |
| } | |
| public static HttpResponseMessage PostAsJson(this HttpClient client, string url) |
| public class AuthModule : NancyModule | |
| { | |
| public AuthModule() | |
| { | |
| Post("/login", async _ => | |
| { | |
| var myclaims = new List<Claim>(new Claim[] { new Claim("Id", "SOME USER ID FROM SOMEWHERE!!") }); | |
| var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(myclaims, "MyCookieMW")); |