These files are part of how I build a powershell profile.
This is what it looks like at startup:
<Query Kind="Program"> | |
<NuGetReference>FluentAssertions</NuGetReference> | |
<NuGetReference>NSubstitute</NuGetReference> | |
<NuGetReference>NUnit</NuGetReference> | |
<NuGetReference>structuremap</NuGetReference> | |
<Namespace>FluentAssertions</Namespace> | |
<Namespace>NSubstitute</Namespace> | |
<Namespace>NUnit</Namespace> | |
<Namespace>NUnit.Framework</Namespace> | |
<Namespace>StructureMap</Namespace> |
Any top-level comment on pull request ought be tagged with one of four emojis:
❓ for a non-blocking comment that asks for clarification. The pull request author must answer the question before the pull request is merged, but does not have to wait for the comment author to re-review before merging.
🎨 for a non-blocking comment that proposes a refactor or cleanup. The pull request author does not have to address the comment for the pull request to merge.
Request Changes
review, and is responsible for re-reviewing once the pull request author has addressed the issue.
😻 for a comment that compliments the author for their work.
use nom::{IResult, dbg_dmp}; | |
use nom::bytes::complete::{tag}; | |
use nom::number::complete::le_u32; | |
fn has_msdos_header(input:&[u8]) -> IResult<&[u8], u32> { | |
const DOS_BEGIN : [u8; 60] = | |
[0x4d, 0x5a, 0x90, 0x00, 0x03, 0x00, 0x00, 0x00, | |
0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, | |
0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
module ExceptionHandlers | |
open System | |
open System.Collections.Generic | |
open System.Diagnostics | |
open Microsoft.Build.Locator | |
open Microsoft.CodeAnalysis | |
open Microsoft.CodeAnalysis.MSBuild | |
open Microsoft.CodeAnalysis.CSharp | |
open Microsoft.CodeAnalysis.Text |
function replaceVariables(templateString) { | |
let tokens = _.uniq(templateString.match(/{{\w*}}/g)) | |
_.forEach(tokens, t => { | |
let variable = t.replace(/[{}]/g, '') | |
let value = environment[variable] || globals[variable] | |
templateString = templateString.replace(new RegExp(t,'g'), value) | |
}); | |
return templateString |
<Project> | |
<PropertyGroup> | |
<IsWindows Condition="'$(OS)' == 'Windows_NT'">true</IsWindows> | |
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPLatform]::OSX)))' == 'true'">true</IsOSX> | |
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPLatform]::Linux)))' == 'true'">true</IsLinux> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(IsWindows)' == 'true'"> | |
<FscToolPath>C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0</FscToolPath> | |
<FscToolExe>fsc.exe</FscToolExe> | |
</PropertyGroup> |
module WebSocketClient | |
open System | |
open System.Net.WebSockets | |
open System.Text | |
open System.Threading | |
open Newtonsoft.Json | |
[<EntryPoint>] | |
let main argv = |
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
using IdentityServer4.Services; | |
using IdentityServer4.Stores; | |
using IdentityServer4.Models; |
#!/bin/sh | |
# Benjamin Collins <aggieben@gmail.com> | |
# Requires GNU readlink (get on macOS with `brew install coreutils`) | |
READLINK=${READLINK:-readlink} | |
cliPath=$(which dotnet) | |
netDir=$(dirname $($READLINK -f $cliPath)) | |
ls -1 "$netDir/sdk" |