Skip to content

Instantly share code, notes, and snippets.

Alessandro Colla Iridio

Block or report user

Report or block Iridio

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
@Iridio
Iridio / VideoCapture.cs
Last active Mar 23, 2016
Component for webcam streaming for XNA 4.0
View VideoCapture.cs
using DirectShowLib;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Threading;
namespace WindowsGame1
{
public class VideoCapture : ISampleGrabberCB, IDisposable
@Iridio
Iridio / CombGuid
Created Aug 3, 2012
CombGuid generator
View CombGuid
//from NHibernate source. Very helpful to prevent fragmentation when using Guid with clustered PK
Guid GenerateComb()
{
byte[] destinationArray = Guid.NewGuid().ToByteArray();
DateTime time = new DateTime(0x76c, 1, 1);
DateTime now = DateTime.Now;
TimeSpan span = new TimeSpan(now.Ticks - time.Ticks);
TimeSpan timeOfDay = now.TimeOfDay;
byte[] bytes = BitConverter.GetBytes(span.Days);
You can’t perform that action at this time.