Skip to content

Instantly share code, notes, and snippets.

View abombss's full-sized avatar

Adam Tybor abombss

  • Accenture
  • Chicago, IL
View GitHub Profile
@phatboyg
phatboyg / .gitconfig
Created March 24, 2010 12:17
Git Config
[core]
autoCRLF = false
editor = c:/bin/git/npp.cmd
[diff]
tool = kd3
[merge]
tool = kd3
[difftool "kd3"]
cmd = c:/bin/git/kdiff3.cmd \"$LOCAL\" \"$REMOTE\"
[difftool]
package roboguice.astroboy;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import roboguice.inject.InjectView;
import java.util.List;
/*
* UrlImageCache.java
*
* Copyright 2010, BuddyTV. All Rights Reserved
* Created 12/13/2010 Mike Markley
*/
package com.buddytv.android.utilities;
import android.graphics.drawable.Drawable;
@gregoryyoung
gregoryyoung / ProbabilityKata
Created June 10, 2011 09:56
Greg Young's Probability Kata
Value objects are an important concept in DDD. This kata is made both to learn value objects and to learn better ways of testing.
Write a probability value object. It should contain the following methods:
Probability CombinedWith(Probability)
Probability InverseOf()
Probability Either(Probability)
if you forget your probability math:
Either:P(A) + P(B) - P(A)P(B)
CombinedWith: P(A)P(B)
@abdullin
abdullin / lock_user.cs
Created September 14, 2012 14:01
Rough cuts of improved Simple Testing
// sample unit test for a command "LockUser"
public class lock_user : user_syntax
{
static readonly UserId id = new UserId(1);
static readonly SecurityId sec = new SecurityId(1);
static readonly TimeSpan fiveMins = TimeSpan.FromMinutes(5);
[Test]
@thomaslevesque
thomaslevesque / AsyncStackTrace.cs
Created August 16, 2013 13:42
Extension method to add "logical" stack trace to async methods, with usage example. Copy/paste in Linqpad and add the following namespaces: - System.Runtime.CompilerServices - System.Threading.Tasks
async void Main()
{
try
{
await FooAsync().AsyncTrace();
}
catch(Exception ex)
{
ex.FullTrace().Dump();
}
@rxaviers
rxaviers / gist:7360908
Last active July 5, 2024 17:44
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@gregoryyoung
gregoryyoung / gist:7677790
Created November 27, 2013 15:40
command handling with same dispatcher
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace crap
{
using System;
using System.Collections.Generic;
using System.Data;
@johnkors
johnkors / PreDeploy.ps1
Created February 6, 2014 16:29
Octopus Deploy - PreDeploy.ps1 for Windows Azure when wanting to modify Cloud Service instance count and/or certificate thumbprint values.
<#
.SYNOPSIS
Modifies some Azure cscfg entries that Octopus Deploy 2.0 is not able to as of today.
.DESCRIPTION
Sets the thumbprint of the first certificate value. Sets the instance count for each role. Octopus-variables must match either of the two forms:
Azure.Role[rolename].Instances
Azure.Role[rolename].Certificate
where rolename is the roleName as defined in the ServiceConfiguration.Cloud.csfcg.
The config file must be named ServiceConfiguration.Cloud.cscfg.
#>