This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class FunctionRunner | |
{ | |
private static readonly string FuncExePath = GetPath(Environment.SpecialFolder.ApplicationData, "npm\\node_modules\\azure-functions-core-tools\\bin\\func.exe"); | |
private readonly string _functionDirectory; | |
private readonly int _timeouteSeconds; | |
public FunctionRunner( | |
string relativeFunctionDirectory, | |
int timeoutSeconds = 15) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
export WORKSPACE_PATH=~/dev | |
- figure out if it is possible to create delimited lists in msbuild properties | |
e.g. export WORKSPACE_PROJECT_PATHS=~/dev/Bar/src/Bar.csproj;~/dev/Foo/Foo.csproj | |
--> | |
<PropertyGroup> | |
<JsonApiDotNetCoreRelativePath>/JsonApiDotNetCore/src/JsonApiDotNetCore.csproj<JsonApiDotNetCoreRelativePath> | |
</PropertyGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: Boxstarter Script | |
# Author: Rich Turner <rich@bitcrazed.com> | |
# Last Updated: 2017-06-07 | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: | |
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST> | |
#---- TEMPORARY --- | |
Disable-UAC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: . ./cd-alias.ps1 | |
# cd .. | |
function CheckLastExitCode { | |
param ([int[]]$SuccessCodes = @(0), [scriptblock]$CleanupScript=$null) | |
if ($SuccessCodes -notcontains $LastExitCode) { | |
$msg = "EXE RETURNED EXIT CODE $LastExitCode" | |
throw $msg | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Total = Invoke-Command -ScriptBlock {netsh int ipv4 show dynamicport tcp} | |
$regex = new-object System.Text.RegularExpressions.Regex ('(Number of Ports : )(\d*)', [System.Text.RegularExpressions.RegexOptions]::MultiLine) | |
$Total = ($regex.Match($Total)).Groups[2].Value | |
$InUse = Invoke-Command -ScriptBlock {(netstat -an | ? {($_ -notmatch 'LISTENING')}).Count} | |
Write-Output “$InUse/$Total ports in use” |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CancellablePromise from '../CancellablePromise'; | |
import Sleep from '../../../test/tools/Sleep'; | |
describe('CancellablePromise', () => { | |
it('can be awaited', async () => { | |
let completed = false; | |
let basePromise = new Promise(resolve => { | |
setTimeout(resolve, 200); | |
}).then(() => (completed = true)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Identifiable from '../../models/Identifiable'; | |
import Error from 'models/Error'; | |
import Client from '../Client'; | |
const { fetch } = global as any; | |
class Model implements Identifiable { | |
id: number; | |
name: string = 'name'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This is a pre-commit script that will automatically ensure any new .csproj files | |
# have been added to the AllProjects solution. AllProjects the solution used on the build | |
# server and must be kept up to date. | |
# | |
# This will fail if you do not have VS 2017+ or the dotnet-cli installed. | |
solution="AllProjects.sln" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"window.zoomLevel": -2, | |
//"terminal.integrated.fontFamily": "Meslo LG M DZ for Powerline", // mac only | |
"workbench.iconTheme": "vscode-icons", | |
"workbench.colorTheme": "Material Palenight", | |
"editor.codeLens": true, | |
"window.zoomLevel": -1, | |
"editor.renderWhitespace": "boundary", | |
"search.exclude": { | |
"**/node_modules": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright (c) 2017 Jared Nance | |
MIT License | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to |
NewerOlder