Skip to content

Instantly share code, notes, and snippets.

View davidpodhola's full-sized avatar

David Podhola davidpodhola

View GitHub Profile
@davidpodhola
davidpodhola / gist:7222765
Created October 29, 2013 21:15
"Dynamic" Contexts
void specify_Basic_steps()
{
foreach (ICommunicatorService communicator in communicators)
{
context["Communicator " + communicator.FriendlyName] = () =>
{
it["Create, update and delete"] = () =>
{
string[] connectParams = getConnectParams(communicator);
communicator.Connect(connectParams[0], connectParams[1], connectParams[2]);
@davidpodhola
davidpodhola / gist:46bdde5e715477cf3616
Created March 22, 2015 09:46
StartLocalSilo.cmd result after upgrade to 1.0.5
== Starting Orleans local silo in C:\Microsoft Project Orleans SDK v1.0\SDK\.\LocalSilo
C:\Microsoft Project Orleans SDK v1.0\SDK
OrleansHost v1.0.0.0 IsDebug.
[2015-03-22 09:43:02.179 GMT 1 INFO 100403 OrleansSiloHost ] Initializing Silo Primary on host=NTB05 CPU count=4 running .NET version='4.0.30319.34209' Is .NET 4.5=True OS version='Microsoft Windows NT 6.2.9200.0'
[2015-03-22 09:43:02.179 GMT 1 INFO 100404 OrleansSiloHost ] Silo running with GC settings: ServerGC=True GCLatencyMode=Batch
[2015-03-22 09:43:02.492 GMT 1 INFO 100403 Silo 127.0.0.1:11111] -------------- Initializing Primary silo on ntb05 at 127.0.0.1:11111, gen 164713382 --------------
[2015-03-22 09:43:02.507 GMT 1 INFO 100415 Silo 127.0.0.1:11111] Starting silo Primary with runtime Version='1.0.0.0 IsDebug.' Config=
Config File Name: C:\Microsoft Project Orleans SDK v1.0\SDK\LocalSilo\OrleansConfiguration.xml
Host: ntb05
Start time: 2015-03-22 09:43:02.492 GMT
@davidpodhola
davidpodhola / gist:025f19a5adc92898742e
Created March 31, 2015 05:00
Working ExchangeMessages
open FSharp.Data
(*
CREATE TABLE [dbo].[ExchangeEmailMessages](
[Id] [int] IDENTITY(1,1) NOT NULL,
[InternalId] [uniqueidentifier] NOT NULL DEFAULT (newid()),
[ExternalId] [nvarchar](2048) NULL,
[LastModifiedTime] [datetime] NOT NULL,
[MailSubject] [nvarchar](max) NULL,
@davidpodhola
davidpodhola / gist:4df276517361f12a517b
Created April 9, 2015 22:33
Sync.Today standard Appenders and Loggers
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="C:\SyncToday2015\Logs\synctoday.txt" />
<maximumFileSize value="50MB" />
<maxSizeRollBackups value="10" />
<rollingStyle value="Composite" />
<appendToFile value="true" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
</layout>
@davidpodhola
davidpodhola / gist:8974c68c098295cbbe9a
Created May 6, 2015 08:44
Upgrade Sync.Today after choco upgrade to version over 0.9.9
choco upgrade chocolatey
Choco uninstall synctoday
(Choose "All versions" (the last one) )
Check:
choco list --local-only
Cd %programdata%
for /d /r %i in (*synctoday*) do @rmdir /s %i
open Microsoft.SharePoint.Client
open System.Net
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Linq.RuntimeHelpers
open System.Linq.Expressions
open System.Security
// Learn more about F# at http://fsharp.net
// See the 'F# Tutorial' project for more help.
@davidpodhola
davidpodhola / Time Tracking - Period Lock
Last active August 29, 2015 14:22
Time Tracking - Period Lock
@davidpodhola
davidpodhola / gist:6887509c6aa70c9e7489
Created June 9, 2015 03:16
Migrate Sync.Today 2013 -> Sync.Today 2015 users
begin tran
insert into consumers ([Name])
select Email from SyncToday.dbo.NuRelations where TypeDescriptor = 1
select * from Consumers
INSERT INTO [ConsumerAdapters] ([AdapterId] ,[ConsumerId] ,[DateJSON])
SELECT (SELECT Id FROM Adapters where Name = 'EXCHANGE'), Id, '' from Consumers
@davidpodhola
davidpodhola / gist:cfba430d44ed492bdde8
Created July 31, 2015 11:41
Sync.Today update all appointments delete nothing during upload
SELECT TOP 1000 [Id]
,[LoginJSON]
,[ServiceId]
,[AccountId]
,[LastSuccessfulDownload]
,[LastDownloadAttempt]
,[LastSuccessfulUpload]
,[LastUploadAttempt]
FROM [dbo].[ServiceAccounts]
@davidpodhola
davidpodhola / gist:a19081f258487a9c7644
Created September 9, 2015 09:36
Running Install-IadwTrendAnalyst
How I run it:
@powershell -NoProfile -ExecutionPolicy Bypass .\Install-IadwTrendAnalyst.ps1
What I get:
TermGroup -Id $TermSetGroupId `
-Name $TermSetGroupName `