Skip to content

Instantly share code, notes, and snippets.

View cyberzed's full-sized avatar

Stefan Daugaard Poulsen cyberzed

View GitHub Profile
# -*- mode: ruby -*-
# vi: set ft=ruby :
install_mono_cmd = 'sudo apt-key adv --keyserver pgp.mit.edu' \
' --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;' \
'echo "deb http://download.mono-project.com/repo/debian' \
' wheezy main"' \
' | sudo tee /etc/apt/sources.list.d/mono-xamarin.list;' \
'sudo apt-get update;' \
'sudo apt-get dist-upgrade -y;' \
sudo apt-get update
sudo apt-get -y install ruby ruby-dev gem 1.9.3
sudo apt-get -y install ruby-bundler g++ make
sudo apt-get -y install nodejs
sudo gem install dashing
sudo update-alternatives --set ruby /usr/bin/ruby1.9.1
var devices = new HidEnumerator().Enumerate();
var device = devices.Last();
device.OpenDevice();
var success = device.Write(new byte[]{ 0x00, 0x01, 0x80, 0x33, 0x01, 0x00, 0x00, 0x00, 0x00 });
if(success)
{
public class AutoMapperInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(
Classes.FromThisAssembly()
.BasedOn<Profile>()
.WithService
.Base()
);
@cyberzed
cyberzed / gist:8f37613564c91d11904c
Last active August 29, 2015 14:03
Motivation abstract

#OSS creates heroes...you can be next!!!

What drives the heroes of open source projects...is it fame, is it a road to an MVP or something like it, what is the actual drive behind all this hard labor?

In this session we will dig down and have a look at what drives magnificent people in the industry. It's not always for the carrot in front and it sure ain't due to the threat of being beaten with a stick. It might not be for the awesome reference on the CV, but when we have passed through all the obvious reasons standing out we look at the deeper meanings behind our sleepless hours. We all have a great piece of motivation in our mind...we just need to find it.

var serverUri = new Uri(@"http://foo:8080/tfs/");
using( var collection = new TfsTeamProjectCollection( serverUri, CredentialCache.DefaultCredentials ) )
{
var server = collection.GetService<ICommonStructureService>();
var projects = server.ListProjects();
var homeProject = (from p in projects
where
@cyberzed
cyberzed / ServiceStackBookTitles.md
Last active December 14, 2015 07:29
Ideas for booktitles for my upcoming book on ServiceStack
  • The ServiceStack Book
  • Building With ServiceStack
  • ServiceStack 101
  • From databases to REST with ServiceStack
  • The Secret ServiceStack
  • Stacking the Web
  • Get Some Rest w/ServiceStack
  • ServiceStack: Got Your Back
  • REST easy with ServiceStack
  • REST in peace with ServiceStack
@cyberzed
cyberzed / gist:3508873
Created August 29, 2012 09:07
What would you expect when converting a .NET Version to SemVer
Environment.Version.Major
//4
Environment.Version.Minor
//0
Environment.Version.Build
//30319
Environment.Version.Revision
//276
//SemVer ex1. 4.0.30319+276
@cyberzed
cyberzed / SemanticVersionComparer.cs
Created August 10, 2012 22:10
Not sure this will be a sane solution...
public class SemanticVersionComparer : IComparer<SemanticVersion>
{
private IDictionary<VersionType, Func<SemanticVersion, SemanticVersion, int>> comparisons =
new Dictionary<VersionType, Func<SemanticVersion, SemanticVersion, int>>();
public int Compare(SemanticVersion x, SemanticVersion y)
{
if (x == y)
{
return 0;