Skip to content

Instantly share code, notes, and snippets.

View cduhard's full-sized avatar

Christian Duhard cduhard

View GitHub Profile
@cduhard
cduhard / interceptor-akka
Created June 29, 2016 00:46
interceptor-akka
enum DelegationType { Handled, Inner }
struct Delegation<T> {
public readonly DelegationType Type;
public readonly T Value;
public Delegation(DelegationType type, T value) {
Type = type;
Value = value;
}
}
using Interceptor<T1, T2> = Func<T1, Delegation<T2>>;
@cduhard
cduhard / dev-node.md
Created February 12, 2016 04:30 — forked from corbanb/dev-node.md
OSX 10.10.X Node Developer Setup

Node.js + OSX 10.10.X

Outline

Below is a quick start guide to developing node.js on OSX. These tools and settings will give you just about everything you would need on a clean install of OSX 10.10.X to get setup and coding.

Install iTerm2

https://www.iterm2.com

Install XCode

Font=Powerline Consolas
ForegroundColour=131,148,150
BackgroundColour=0,43,54
CursorColour=220,50,47
Black=7,54,66
BoldBlack=0,43,54
Red=220,50,47
BoldRed=203,75,22
Green=133,153,0
BoldGreen=88,110,117
public abstract class BackoffProtocol
{
/// <summary>
/// I made the TrackedMsg generic so you wont have to do manual matching in your child actor.
/// Downside is, that it limits your communication options with the child actor.
/// </summary>
/// <typeparam name="T"></typeparam>
[Serializable]
public sealed class TrackedMsg<T>
{
cinst 7zip.install
cinst Atom
cinst autohotkey.portable
cinst baretail
cinst beyondcompare
cinst ChocolateyGUI
cinst Clover
cinst Cygwin
cinst DotNet4.5
cinst DotNet4.5.1
@cduhard
cduhard / downloadBuildVideos.ps1
Created December 10, 2012 20:06 — forked from erichexter/downloadBuildVideos.ps1
Download build 2012 videos
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)
#Set the username for windows auth proxy
$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/Build/2012/RSS/wmvhigh"))
$a.rss.channel.item | foreach{
$url = New-Object System.Uri($_.enclosure.url)
$file = $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + ".wmv"
if (!(test-path $file))
{
#!/bin/bash
# Inspired by http://blog.fiveruns.com/2008/9/24/rails-automation-at-slicehost
yum install -y l gcc-c++ zlib-devel openssl-devel
yum install -y mysql-server mysql-devel
/etc/init.d/mysqld start
yum install -y ruby rdoc ruby-devel
RUBYGEMS="rubygems-1.3.1"
wget http://rubyforge.org/frs/download.php/45905/$RUBYGEMS.tgz