Skip to content

Instantly share code, notes, and snippets.

Stan barsv

Block or report user

Report or block barsv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@barsv
barsv / logger.ps1
Last active Oct 4, 2019
Logging in powershell with log rotation
View logger.ps1
# all logging settins are here on top
$logFile = "log-$(gc env:computername).log"
$logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL")
$logSize = 1mb # 30kb
$logCount = 10
# end of settings
function Write-Log-Line ($line) {
Add-Content $logFile -Value $Line
Write-Host $Line
@barsv
barsv / BindingTest.cs
Last active May 27, 2019
Binding Proof of concept
View BindingTest.cs
using System;
using System.Linq.Expressions;
using PostSharp.Aspects;
namespace BindingTest
{
class Program
{
static void Main()
{
You can’t perform that action at this time.