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
# See comments for examples |
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
// See comments for examples. |
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
# See comments for examples |
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
provider "aws" { | |
access_key = "YOURACCESSKEYHERE" | |
secret_key = "YOURSECRETKEYHERE" | |
region = "us-west-1" | |
} | |
resource "aws_instance" "example" { | |
ami = "ami-00048435fed26a8d1" # Ubuntu 14.04 LTS | |
instance_type = "t2.micro" | |
key_name = "my_keypair" |
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
private void SaveWhiteBlackListDataImportFile(IEnumerable<PartInfoImportFile> parts, int userID) | |
{ | |
using (var sqlConnection = new SqlConnection(_connectionString)) | |
{ | |
sqlConnection.Open(); | |
using (var multi = sqlConnection.QueryMultiple("dbo.SavePartInfoImportFileData", | |
new PartInfoDynamicParam("ParameterTable", parts, userID), | |
commandType: CommandType.StoredProcedure, commandTimeout: 120)) { | |
} |
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
cls | |
ECHO "Hard rebuilding 'Main' solution. Go get some coffee, this is going to take a few minutes ..." | |
$stopWatch = [system.diagnostics.stopwatch]::startNew() | |
ECHO "Cleaning solution ..." | |
devenv C:\Projects\Main.sln /clean | |
ECHO "Deleting remaining contents in bin folders ..." |
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; | |
public class Program | |
{ | |
public static void Main() { | |
new Functions().Start(); | |
} | |
} | |
public class Functions |
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 PoorContainer { | |
public void Register<T>(T t) { | |
types.Add(typeof(T), t); | |
} | |
public T Resolve<T>() { | |
return (T)types[typeof(T)]; | |
} | |
private readonly Dictionary<Type, object> types = new Dictionary<Type, object>(); |
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
select t.full_name as table_name, c.column_name, case when c.system_type_id = 127 then 9223372036854775808/2 else 2147483648/2 end as seed_value | |
from sys_columns c | |
inner join sys_tables t on t.full_name = c.full_name | |
where c.is_identity = 1 and t.is_replicated = 1 | |
order by t.full_name | |
select 'DBCC CHECKIDENT(''' + t.full_name + ''', reseed, ' + cast(cast(2147483648/2 as int) as varchar) + ')' as reseed_command | |
,t.full_name as table_name, c.column_name, cast(2147483648/2 as int) seed_value | |
from sys_columns c | |
inner join sys_tables t on t.full_name = c.full_name |
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
// Evil if: | |
if (x == 1) { | |
if (x == 1.1) { | |
print("lorem ipsum 1.1") | |
} | |
else if (x == 1.2) { | |
print ("lorem ipsum 1.2") | |
} | |
else if (x == 1.3) { |
NewerOlder