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
#==== change text file end-of-line from DOS (Windows) to Linux ====# | |
find . -name "*.sh" -exec sed -i 's/\r\+$//g' '{}' \; | |
#==== hardware/system info ==== | |
numactl --hardware | |
dmesg |
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 class WeekKey | |
{ | |
private int value; | |
public static implicit operator int(WeekKey weekKey) { return weekKey.value; } | |
public static implicit operator WeekKey(int weekKey) { return new WeekKey { value = weekKey }; } | |
} |
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 static void M(string[] args) | |
{ | |
var builder = new VerticaConnectionStringBuilder | |
{ | |
Host = "54.83.238.208", | |
Database = "Test", | |
User = "dbadmin", | |
Password = "password", | |
Port = 5433, | |
Pooling = 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
-- DROP THE CONSTRAINTS | |
DECLARE @database nvarchar(50); | |
DECLARE @schemaName nvarchar(50); | |
DECLARE @sql nvarchar(300); | |
SET @database = ''; -- set the catalog name | |
SET @schemaName = ''; -- set the database name | |
SELECT @sql = 'USE ' + @database +';'; | |
EXEC sp_executesql @sql; |
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 Alias | |
{ | |
protected readonly string Value; | |
protected Alias(string value) | |
{ | |
if (value == null) throw new ArgumentNullException("value"); | |
if (string.Empty.Equals(value, StringComparison.InvariantCultureIgnoreCase)) | |
throw new ArgumentException("Value must not be empty.", "value"); | |
Value = value; |
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
Put the commands to execute in here |
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
twistd -n web -p 8888 --path . |
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
// So the question is - how would I configure OpenRasta to enable the below, where a real-world URI might look like (and any number of FooId | |
// arguments may be supplied): | |
// /queries/FooReportResource?LastReportDate=2010-05-23Z&ApplicableFoos=FooId1,FooId2,FooId3,FooId4 | |
public class Configuration : IConfigurationSource | |
{ | |
public void Configure() | |
{ | |
using (OpenRastaConfiguration.Manual) | |
{ |
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 interface IHandleCommands<TCommand> where TCommand : IAmACommand | |
{ | |
void Handle(TCommand command); | |
} | |
public interface IAmACommand | |
{ | |
Guid AggregateId { get; } | |
} |
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
Type actual = Given.AType("Foo", With.A.Constructor( | |
With.A.Parameter("bar", Of.AType("Bar", With.A.DefaultConstructor)) | |
, With.A.Parameter("baz", Of.AType("Baz", | |
With.A.Constructor(With.A.Parameter("fizz", Of.AType("Fizz", With.A.DefaultConstructor))))) | |
, With.A.Parameter("buzz", Of.AnExistingType<int>()))); |
OlderNewer