Skip to content

Instantly share code, notes, and snippets.

private void LoadRecentPlayers()
{
var repo = ObjectFactory.Get<IPlayerRepository>();
try
{
var players = repo.RecentPlayers(100);
FinishLoad(players, button1);
}
catch (Exception ex)
{
require 'services/tinyurl'
require 'services/bitly'
require 'services/isgd'
require 'services/longurl'
services =
{
:tinyurl => TinyUrl.new,
:bitly => BitLy.new,
:isgd => IsGd.new,
public static class BoolExtensions
{
public static void Duh(this bool value)
{
Assert.IsTrue(value);
}
}
*\bin* *\obj* *.suo *.user *.bak **.ReSharper** **\_ReSharper.** StyleCop.Cache *\TestResults*
using Elmah;
using System.Collections;
namespace ElmahTest
{
public class CustomSQLLog : Elmah.ErrorLog
{
private readonly SqlErrorLog errorLog;
public CustomSQLLog(IDictionary config) : this()
{
<elmah>
<errorLog type="ElmahTest.CustomSQLLog, ElmahTest"/>
</elmah>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel.Activation;
using System.ServiceModel;
namespace CMWeb.Common
{
public class CMServiceHostFactory : ServiceHostFactory
<%@ ServiceHost Language="C#" Debug="true"
Service="CMWeb.Services.SkillRatingTypes"
CodeBehind="SkillRatingTypes.svc.cs"
Factory="CMWeb.Common.CMServiceHostFactory"
%>
require 'rubygems'
require 'bishop'
require 'twitter'
class TwitterClassifier
@@spam_threshold = 0.3
def initialize(knowledge_file=nil)
@bishop = Bishop::Bayes.new
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
xml.title "light code"
xml.description "light code posts"
xml.link formatted_post_url(:rss)
for post in @posts
xml.item do
xml.title post.title