Skip to content

Instantly share code, notes, and snippets.

Ken Egozi kenegozi

Block or report user

Report or block kenegozi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kenegozi / XunitConsoleForwarder.cs
Created Jun 25, 2017
Capturing console output in Xunit 2 tests
View XunitConsoleForwarder.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Xunit.Abstractions;
namespace MagicalUnicorns {
public class XunitConsoleForwarder : TextWriter {
private readonly ITestOutputHelper output;
kenegozi / EnvThenConfigSettings.cs
Created Jun 1, 2015
Env based appSettings overrides, plus DictionaryAdapter fun
View EnvThenConfigSettings.cs
using System;
using System.Configuration;
using System.Collections;
using Castle.Components.DictionaryAdapter;
namespace Demo {
class MainClass {
public static void Main (string[] args) {
var ageString = (string)ConfigurationManager.AppSettings ["Age"];
View gist:38efab4ef3a810efb0d8
private func validateInputs() -> Bool {
let nonEmpty = {
(data:String!) -> Bool in
return count(data) != 0
func inRange (min: Int!, max:Int!) -> (String!) -> Bool {
return { (data:String!) -> Bool in
let dataAsInt = data.toInt()
return (dataAsInt! >= min && dataAsInt! <= max)

Keybase proof

I hereby claim:

  • I am kenegozi on github.
  • I am kenegozi ( on keybase.
  • I have a public key whose fingerprint is 4233 DAB9 6173 B1E4 E3D0 6263 B290 B45A ABB9 35CD

To claim this, I am signing this object:

kenegozi / SimpleChannelPatterns.cs
Created Jan 16, 2015
Mimicking some of the samples from the talk "Go Concurrency Patterns" in c# (slides at , to help illustrate the GO Channel concept to C# developers.
View SimpleChannelPatterns.cs
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
namespace GoPatterns
class Program
static void Main()
View applicationhost
<add name="fcgi-golang" path="*.go" verb="*" modules="FastCgiModule" scriptProcessor="c:\w\playground\go-iis\std.exe" resourceType="Either" requireAccess="Read" />
<application fullPath="c:\w\playground\go-iis\std.exe"
View humitemp1.ino
// Humidity and temperature monitor
// for Arduino UNO R3 (and probably most others)
// Main pieces:
// DHT11 humidity/temp sensor
// - mandatory 10k pull-up resistor
// -> using DHT.f by adafruit at
// 16x2 LCD
// - 10K potentiometer for contrast control
// - Push button and transistor for backlight control
// - 220ohm resistor to make the backlight a bit darker
kenegozi / EditMyMobileServiceDataWithExcel.cs
Created Sep 7, 2012
Editing Azure Mobile Service data using Excel
View EditMyMobileServiceDataWithExcel.cs
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Forms;
using Microsoft.Office.Core;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Excel = Microsoft.Office.Interop.Excel;
kenegozi / GistsResolver.cs
Created Sep 4, 2012
Given a gist embed script tag, get the gist's content
View GistsResolver.cs
public class GistsResolver {
public static string CreateContentForFeedFrom(string content) {
try {
return UnwrapGists(content, GetGist);
catch {
return content;
kenegozi / MobileServices_WindowsPhone.cs
Created Aug 29, 2012
First glance on my unofficial Windows Phone SDK for Azure Mobile Services
View MobileServices_WindowsPhone.cs
// in App.xaml.cs
public partial class App : Application
public static readonly MobileServiceClient MobileServiceClient;
public static User CurrentUser;
static App()
// Get this data from the management portal's quickstart page
// in the 'connect to existing apps' section
You can’t perform that action at this time.