This will require OSX and ZSH installed.
For tests it will require your directory name to match your namespace for tests as it uses the directory name to pass the namespace to xunit
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using TinyIoC; | |
using Nancy.BootStrapper; | |
using Nancy.Routing; | |
namespace Nancy | |
{ |
private static FakeNancyModule GenerateNewFakeNancyModuleType() | |
{ | |
var typeName = String.Format("FakeNancyModule-" + Guid.NewGuid()); | |
var assemblyName = new AssemblyName("NancyDynamic"); | |
var assemblyBuilder = System.Threading.Thread.GetDomain().DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run); | |
var module = assemblyBuilder.DefineDynamicModule("NancyDynamicModule"); | |
var builder = module.DefineType(typeName, TypeAttributes.Public, typeof(FakeNancyModule)); | |
return Activator.CreateInstance(builder.CreateType()); | |
} |
public IObservable<WebResponse> MakeWebRequest( | |
Uri uri, | |
Dictionary<string, string> headers = null, | |
string content = null, | |
int retries = 3, | |
TimeSpan? timeout = null) | |
{ | |
var request = Observable.Defer(() => | |
{ | |
var hwr = WebRequest.Create(uri); |
$dontcare = git fetch origin --prune | |
$branches = git branch -a --merged | | |
?{$_ -match "remotes\/origin"} | | |
?{$_ -notmatch "\/master"} | | |
%{$_.Replace("remotes/origin/", "").Trim() } | |
if (-not $branches) { | |
echo "No merged branches detected" | |
exit 0 | |
} |
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
public class C | |
{ | |
public async Task<IEnumerable<string>> M() | |
{ | |
return await N(); | |
} |
#!/usr/bin/env python | |
# | |
# analyze.py Example of an LLDB script that loads SOS and runs a command | |
# for analysis of a .NET Core application on Linux/macOS. | |
# Requires LLDB matching the version of libsosplugin.so for your | |
# CoreCLR version, and gdb. | |
# | |
# USAGE: analyze.py [--memory] [--stacks] COREFILE | |
# | |
# NOTE: To run this as stand-alone, you might need to fix some bad symlinks |
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
# Make sure you have a recent version: the code points that Powerline |
#!/bin/bash | |
MINIKUBE_IP=$(minikube ip) | |
MINIKUBE_KEY_LOCATION=${HOME}/.minikube/machines/minikube/id_rsa | |
STARTING_PORT=8080 | |
CURRENT_PORT=${STARTING_PORT} | |
for servicename in $*; do | |
HIGH_PORT=$(kubectl get svc ${servicename} -o custom-columns=':spec.ports[*].nodePort' | tail -n1) | |
if echo $HIGH_PORT | grep -q ,; then |