Skip to content

Instantly share code, notes, and snippets.

View micdenny's full-sized avatar

Michael Denny micdenny

View GitHub Profile
@micdenny
micdenny / program.cs
Last active August 29, 2015 14:03
Roll the dice
using System;
using System.Security.Cryptography;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var r = RollDice(250);
@micdenny
micdenny / Program.cs
Created June 18, 2014 14:44
CastleWcfFacilityPolicyCatchAsync
using System;
using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Threading;
using System.Threading.Tasks;
using Castle.Facilities.WcfIntegration;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
@micdenny
micdenny / Program.cs
Last active August 29, 2015 14:01
CGMiner Api Test
void Main()
{
var client = new TcpClient("192.168.1.6", 4028);
using (var stream = client.GetStream())
{
using (var reader = new StreamReader(stream))
{
var data = System.Text.Encoding.ASCII.GetBytes("{\"command\":\"summary\",\"parameter\":\"\"}");
stream.Write(data, 0, data.Length);