Skip to content

Instantly share code, notes, and snippets.

View elderfo's full-sized avatar

Chris 'Freddy' Getsfred elderfo

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elderfo
elderfo / install-vstest-logger.ps1
Last active August 11, 2020 11:34
Install TC VS Test Logger
$zipFile = "$($env:TEMP)\TeamCity.VSTest.TestLogger.zip"
$zipOutput = "$($env:TEMP)\TeamCity.VSTest.TestLogger"
$loggerPath = "$($zipOutput)\vstest15"
$vsTestExtensions = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\Extensions"
try {
Invoke-WebRequest -Uri "http://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:TeamCityPluginsByJetBrains_TeamCityVSTestTestAdapter_Build,pinned:true,status:SUCCESS,branch:master,tags:release/artifacts/content/TeamCity.VSTest.TestLogger.zip" -OutFile $zipFile
@elderfo
elderfo / artifacts-credprovider.ps1
Last active April 17, 2019 12:01
Nuget Artifacts CredProvider
# A PowerShell script that adds the latest version of the Azure Artifacts credential provider
# plugin for Dotnet and/or NuGet to ~/.nuget/plugins directory
# To overwrite existing plugin with the latest, run installcredprovider.ps1 -Force
# More: https://github.com/Microsoft/artifacts-credprovider/blob/master/README.md
param(
[switch]$Force
)
$script:ErrorActionPreference = 'Stop'
@elderfo
elderfo / build.bat
Last active April 24, 2019 16:07
My Default Cake Config
@echo off
set "TARGET=%1"
if "%TARGET%"=="" set "TARGET=ci"
REM Capture all tokens after the "target" and pass them on the the script
for /f "tokens=1,* delims= " %%a in ("%*") do set ALL_BUT_FIRST=%%b
powershell -ExecutionPolicy ByPass -File "build.ps1" -script "build.cake" -target "%TARGET%" -verbosity normal %ALL_BUT_FIRST%
##########################################################################
# This is the Cake bootstrapper script for PowerShell.
# This file was downloaded from https://github.com/cake-build/resources
# Feel free to change this file to fit your needs.
##########################################################################
<#
.SYNOPSIS
This is a Powershell script to bootstrap a Cake build.
@elderfo
elderfo / docker-cheat-sheat.md
Created February 9, 2019 14:41 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

./gradlew buildDocker
docker-compose -f docker-compose.yml -f docker-compose.e2e.yml down --remove-orphans
docker-compose -f docker-compose.yml -f docker-compose.e2e.yml up -d
docker run -it --rm \
-v ${PWD}:/root/labrea \
-w /root/labrea \
--net labrea_default \
-e REUTERS_JDBC_URL=jdbc:postgresql://reuters-aptemod:5432/reuters_aptemod \
-e TREC_JDBC_URL=jdbc:postgresql://trec-legal-2010:5432/trec_legal_2010 \
-e LABREA_WEBAPP_HOST=labrea-webapp \
@elderfo
elderfo / boxstarter.ps1
Last active April 5, 2018 11:39 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@elderfo
elderfo / build.gradle
Created February 20, 2018 18:20
Integration Test Source Set for Gradle
apply plugin: 'java'
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
sourceSets {
integrationTest {
java.srcDir file('src/integration-test/java')
@elderfo
elderfo / data.test.js
Created September 28, 2017 22:32
doMock - failing test
import fetch from 'node-fetch';
import { getCategories } from './data';
jest.mock('node-fetch');
beforeEach(() => {
jest.resetAllMocks();
});