Skip to content

Instantly share code, notes, and snippets.

View maxfunke's full-sized avatar
🦀

Baron GitGit maxfunke

🦀
View GitHub Profile
@maxfunke
maxfunke / getLoginsFromEventlog.ps1
Created November 12, 2018 08:09
logins fetched from windows eventlog, filtered
Get-EventLog -LogName System -Source Microsoft-Windows-Winlogon -After (Get-Date).AddDays(-7) | where {$_.InstanceId -eq 7001}
@maxfunke
maxfunke / ChangeSoftwareVersion.ps1
Created January 11, 2019 20:45
changes version number in c# project files and SharedAssemblyInfo
<#
.SYNOPSIS
Update Software Version.
.DESCRIPTION
Finds SharedAssemblyInfo.cs in the solution and installer script in deployment directory.
Replaces code parts that define the software version in those files.
.EXAMPLE
"ChangeSoftwareVersion.ps1 -LocalPath . -Version 0.99.99"
.PARAMETER LocalPath
The path to the branch, with the installer script and SharedAssemblyInfo, which contain the software version.
@maxfunke
maxfunke / multistage.Dockerfile
Created January 11, 2019 20:46
multistage dockerfile
# Multistage build
FROM golang:alpine as build
## stage1: build app, make use of /go/src
RUN mkdir /go/src/app
WORKDIR /go/src/app
ADD ./src/main.go /go/src/app
RUN go build -o /bin/app
<#
.SYNOPSIS
Finds all test .dlls and adds them to a code coverage run.
Generates a code coverage report.
.EXAMPLE
"ExecuteCodeCoverage.ps1 -testDllDir . -reportOutDir .\report -reportOutFormat html -testRunnerDir ."
All arguments are optional. Should work like magic.
#>
param (
@maxfunke
maxfunke / git_commitGraph.md
Created January 18, 2019 09:54
Speed up git (prompt)

enable commit graph feature git config core.commitGraph true

Now you have to recreate the graph file update commit-graph

git show-ref -s | git commit-graph write --stdin-commits