Skip to content

Instantly share code, notes, and snippets.

Pawel Pabich pawelpabich

Block or report user

Report or block pawelpabich

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
@pawelpabich
pawelpabich / LogModule.cs
Created Jul 7, 2012
Log4Net and NLog modules for Autofac
View LogModule.cs
using System;
using System.Linq;
using Autofac;
using Autofac.Core;
using NLog;
using log4net;
using LogManager = NLog.LogManager;
namespace AutofacIdea
{
@pawelpabich
pawelpabich / Function.cs
Last active Oct 16, 2019
Stateless function
View Function.cs
#Defintion
public static class SetServerUrl
{
public static Task Run(paramters)
{
//Body
}
}
View InstallServer.ps1
param([string] $Version, [string] $StorageAccount, [string] $StorageUser, [string] $StoragePassword)
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest;
New-Item -ItemType Directory -Force -Path C:\Temp
function Log($Message)
{
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss,fff"
View ProvisionInstance.ps1
param([string] $VirtualMachineFullDNSName, [string] $ConnectionString, [string] $AdministratorPassword, [string] $EncodedLicense, [string] $StoragePath, [string] $InstanceName, [Int] $ServerCommPort)
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest;
function Log($Message)
{
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss,fff"
$newLine = [System.Environment]::NewLine
$logEntry = "$timestamp $Message $newLine"
View azurepoc.ps1
param([string] $IpAddress, [string] $ConnectionString, [string] $AdministratorPassword, [string] $EncodedLicense, [string] $StoragePath, [string] $StorageAccount, [string] $StorageUser, [string] $StoragePassword)
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest;
function Log($Message, $IncludeTimestamp)
{
$logEntry = $Message
if ($IncludeTimestamp)
@pawelpabich
pawelpabich / InputData.txt
Created Jan 1, 2013
Word count using Hive
View InputData.txt
Hello
World
Bye
World
View VSError
=====================
18/05/2018 9:44:40 AM
LimitedFunctionality
System.AggregateException: Project system data flow 'OutputGroupsService Outer 84518' closed because of an exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.ProjectServices.DesignTimeBuilder.<BuildAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
@pawelpabich
pawelpabich / Private Setter
Created Mar 25, 2014
Trying to serialize and deserialize a class with private setter in the base class
View Private Setter
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace ConsoleApplication12
{
class Program
View pac
function FindProxyForURL(url, host)
{
return "PROXY localhost:8888";
}
@pawelpabich
pawelpabich / Get-Events.ps1
Last active Mar 23, 2017
Gets events related to variable sets
View Get-Events.ps1
param($OctopusServerUrl, $OctopusServerApiKey, $OutputFile, $DateFrom, $DateTo)
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest;
$Server = @{ OctopusServerUrl = $OctopusServerUrl; OctopusServerApiKey = $OctopusServerApiKey}
function Get-Data($Path)
{
$Path = $Path.Replace("api/", "")
You can’t perform that action at this time.