Skip to content

Instantly share code, notes, and snippets.

View mbratukha's full-sized avatar

Mykhailo Bratukha mbratukha

View GitHub Profile
@mbratukha
mbratukha / recursion.js
Last active March 15, 2016 12:50 — forked from bendc/recursion.js
Functional loop
const loop = (() => {
const recur = (callback, count, i=0) => {
if (i == count-1) return callback(i);
callback(i);
return recur(callback, count, i+1);
};
return (callback, count) => {
if (count > 0) return recur(callback, count);
};
})();
@mbratukha
mbratukha / app.config
Last active February 12, 2016 16:41 — forked from Krizzzn/app.config
C# - accessing service reference with the headers Negotiate, Ntlm
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="NintexWorkflowWSSoap">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
@mbratukha
mbratukha / WebServiceInvoker.cs
Created February 12, 2016 15:54 — forked from escobar5/WebServiceInvoker.cs
Dynamically invoking a web service
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.ServiceModel.Security;