Skip to content

Instantly share code, notes, and snippets.

@pvasek
pvasek / config.yaml
Last active July 25, 2023 13:46
LOKI Promtail configuration for .NET core with serilog compact format
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://loki:3100/api/prom/push
<#
.SYNOPSIS
Uploads all screenshot images generated by end to end test to the TFS/vsonline server.
.DESCRIPTION
The images are expected to be organized in the $screenshotRootDir in subfolders named as Release.Name
for example `C:/screenshots/Release-21`. The images should be named as the test itself for example
if we have test `Should_add_new_user` the image has to be named `Should_add_new_user.png`.
This script uses the OAuth token to access TFS therefore the option "Allow scripts to access OAuth token"
has to be enabled on the build that use it.
@pvasek
pvasek / grep.ps1
Last active August 29, 2015 13:56
PS - grep
get-content <file> | select-string "<pattern>"
@pvasek
pvasek / CoffeeScriptCachedCompiler.cs
Created December 6, 2012 10:25
Cassette coffee script compiler wrapper.
public class CoffeeScriptCachedCompiler : ICoffeeScriptCompiler
{
private readonly ICoffeeScriptCompiler _compiler;
public CoffeeScriptCachedCompiler(ICoffeeScriptCompiler compiler)
{
_compiler = compiler;
_hashFunction = MD5.Create();
}