Skip to content

Instantly share code, notes, and snippets.

@cthrash
cthrash / CognitiveServiceContainerProxyExample.js
Last active December 14, 2018 18:01
Cognitive Service Container Proxy Example
// Cognitive Service containers don't currently handle Cross-origin resource sharing (CORS) headers. This means that for user agents
// that enforce CORS (browsers, typically), requests will fail. The following code is an example of how you might work around this,
// temporarily, until the containers are fixed. This code is provided as-is, with no guarantees.
//
// The following is a modified version of code found here: https://github.com/ccoenraets/cors-proxy.
var express = require('express'),
request = require('request'),
bodyParser = require('body-parser'),
app = express();
@cthrash
cthrash / FoxTrot.cs
Created April 30, 2017 15:43
Solution to FoxTrot 'Jumble'
using System;
using System.Collections.Generic;
namespace foxtrot
{
class Program
{
static IEnumerable<int> FourDigitMultipleOf117()
{
for (int i = ((1000/117)+1)*117; i < 10000; i += 117) {