Skip to content

Instantly share code, notes, and snippets.

@msmorul
msmorul / lync-sample1.py
Created December 10, 2013 23:31
Example python script for authenticating to Lync and creating an application endpoint that lists all of a persons contacts. Python example for what's described here https://ucwa.lync.com/documentation/keytasks-createapplication
import requests
import json
from urlparse import urlparse
sip_domain = "SIP_DOMAIN.COM"
username = "USERNAME@SIP_DOMAIN.COM"
password = "YOUR_LYNC_PASSWORD"
def extractAuthURL(str):
start = str.find('MsRtcOAuth');
@etaque
etaque / CamelApp.scala
Created February 23, 2013 08:24
Consume ActiveMQ messages with akka-camel
package org.example
import akka.actor._
import akka.camel.{ CamelMessage, Consumer, CamelExtension }
import org.apache.activemq.camel.component.ActiveMQComponent
class CdrLogConsumer extends Actor with Consumer {
def endpointUri = "activemq:FOO.BAR"
def receive = {
anonymous
anonymous / gist:950728
Created May 1, 2011 18:49
let g_maxSize = 4480
let fileSizes = [|1 .. 99|]
let optimalResults = Array.init (g_maxSize+1) (fun _ -> Array.create fileSizes.Length 0)
let lastStep = Array.init (g_maxSize+1) (fun _ -> Array.create fileSizes.Length 0)
for containerSize=0 to g_maxSize do
let optimalResultsContainerSize = optimalResults.[containerSize]
let lastStepContainerSize = lastStep.[containerSize]
for idx=0 to fileSizes.Length-1 do