Skip to content

Instantly share code, notes, and snippets.

View mbratukha's full-sized avatar

Mykhailo Bratukha mbratukha

View GitHub Profile
@mbratukha
mbratukha / components.my-test.js
Last active August 29, 2015 14:27
Action helper method "on" doesn't work
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
testAction() {
Ember.Logger.info("MouseDown event has been caught!");
}
}
});
@mbratukha
mbratukha / components.comp-1.js
Last active October 28, 2015 10:29
toggleProperty bug?
import Ember from 'ember';
export default Ember.Component.extend({
prop1: false,
hello: "Default text of comp-1",
_changeHello: function() {
this.set('hello', 'Text set by comp-1');
}.on("init"),
@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;
@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 / 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);
};
})();