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
class StrQ < Q | |
attr_accessor :default | |
def initialize(question, default = nil, io_source = STDIN, validator = nil) | |
@question = question | |
@default = default | |
@io_source = io_source | |
@validator = validator || lambda { true } | |
end |
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
#First in your powershell profile in | |
#C:\Users\<<username>>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
set-location D:\code | |
. "C:\Users\<<username>>\Documents\WindowsPowerShell\Get-ChildItemColor.ps1" # read the colourized ls | |
set-alias ls Get-ChildItemColor -force -option allscope | |
function Get-ChildItem-Force { ls -Force } | |
set-alias la Get-ChildItem-Force -option allscope | |
#Then in: |
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.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Threading; | |
namespace ConsoleApplication1 | |
{ | |
class App | |
{ |
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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade | |
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
// Create an UDP client for sending metrics to "localhost:2003", prefixing all keys with "foo.bar" | |
using(var client = new GraphiteUdpClient("192.168.1.45", 2003, "jayway.letslog")) | |
{ | |
// Report a metric | |
client.Send("baz", 10); | |
// Report a metric specifying timestamp | |
client.Send("baz", 21, DateTime.UtcNow.AddSeconds(42)); | |
} |
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
// Copyright 2007-2011 Henrik Feldt | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use | |
// this file except in compliance with the License. You may obtain a copy of the | |
// License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software distributed | |
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
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
// SecuritySafeCritical because it references MessageLockLostException, MessagingCommunicationException, | |
// MessagingEntityAlreadyExistsException, MessagingEntityNotFoundException, ServerBusyException, ServerErrorException | |
[SecuritySafeCritical] | |
private static bool CheckIsTransient(Exception ex) | |
{ | |
if (ex is FaultException) | |
{ | |
return false; | |
} | |
else if (ex is MessagingEntityNotFoundException) |
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
/// <summary> | |
/// Initializes a new instance of the <see cref="RetryManagerImpl"/> class. | |
/// </summary> | |
/// <param name="retryStrategies">The complete set of retry strategy.</param> | |
/// <param name="defaultRetryStrategyName">The default retry strategy.</param> | |
/// <param name="defaultSqlConnectionStrategyName">The default retry strategy for SQL connections.</param> | |
/// <param name="defaultSqlCommandStrategyName">The default retry strategy for SQL commands.</param> | |
/// <param name="defaultAzureServiceBusStrategyName">The default retry strategy for Windows Azure Service Bus.</param> | |
/// <param name="defaultAzureCachingStrategyName">The default retry strategy for Windows Azure Caching.</param> | |
/// <param name="defaultAzureStorageStrategyName">The default retry strategy for Windows Azure Storage.</param> |
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.Collections.Generic; | |
using System.Numerics; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Linq; | |
using Magnum.Extensions; | |
using Magnum.Policies; | |
using MassTransit.Context; | |
using NUnit.Framework; |
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
. $PROFILE |
OlderNewer