This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ `ssh $MY_HOST ps aux | awk '{sum+=$6}; END {print sum}'` -gt $RAM_LIMIT ]; then growlnotify -m "Some message"; fi ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
using System; | |
namespace Castle.Windsor.Tests.SubContainers | |
{ | |
[TestFixture] | |
public class ChildContainerSingleResolutionTestCase | |
{ | |
private IWindsorContainer parentContainer; | |
private IWindsorContainer childContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using ExtensionMethods; | |
namespace Events | |
{ | |
public static class DomainEvents | |
{ | |
private static IEventHandlerResolver _handlerResolver; | |
public static bool IsInitialised() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web.Mvc; | |
using V2.Domain.Services; | |
using V2.Domain.Services.Messages; | |
using MvcContrib.Attributes; | |
using System.Linq; | |
namespace V2.Web.Controllers | |
{ | |
public class RegistrationController : ControllerBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using ExtensionMethods; | |
namespace Events | |
{ | |
public static class DomainEvents | |
{ | |
private static IEventHandlerResolver _handlerResolver; | |
public static bool IsInitialised() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Thing | |
{ | |
} | |
public interface IMarker {} | |
public interface IUseful<T> : IMarker where T : Thing | |
{ | |
T DoSomething(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Suteki = Suteki || {}; | |
Suteki.new_eventBus = (function(){ | |
var self = {}; | |
var subscriptions = {}; | |
var unsubscribeTokens = []; | |
var subscriptionPointers = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How we store all time views across the entire system for http://gauge.es. | |
# All in one document that gets incremented using MongoDB $inc modifier in | |
# every track. The $inc increments t, year.t, year.month.t, year.month.day.t | |
# so we get to the day numbers. These are in EST, as we are in EST and these | |
# stats are just for us. :) Nothing amazing, but thought I would share. | |
# | |
# >> pp View.all_time | |
{ | |
"_id" => "all_time", | |
"t" => 502352, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.twitter.twitter-mac UserTimelineDerepeater -bool true | |
defaults write com.twitter.twitter-mac ScrollingMakesKeyAndOrdersFront -bool true | |
defaults write com.twitter.twitter-mac TypeAnywhereToTweet -bool true | |
defaults write com.twitter.twitter-mac HideInBackground -bool true | |
defaults write com.twitter.twitter-mac NormalComposeWindowLevel -bool false | |
defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Subject / EventLoopScheduler / CompositeDisposable are all from the Reactive Library for .Net 3.5. | |
Most of these classes are baked into .NET 4 AFAIK | |
*/ | |
// Event loop and queue setup done in constructor | |
_sendQueue = new Subject<Action>(); | |
var scheduler = new EventLoopScheduler( "EmailSender" ); | |
var queueSubscription = _sendQueue.ObserveOn( scheduler ).Subscribe( action => action() ); | |
_queueCleanup = new CompositeDisposable( queueSubscription, scheduler ); |
OlderNewer