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
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
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
declare @NotesXml xml = | |
'<root> | |
<Notes CreationDate="01/18/2015" Note="Note 1" UserID="10"/> | |
<Notes CreationDate="01/18/2015" Note="Note 2" UserID="20"/> | |
</root>' | |
declare @notesTable as table ( | |
CreationDate datetime, | |
Note varchar(max), | |
UserID int |
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
// This code gets all textboxes with the 'required' class and | |
// executes a method for those that don't have a value. | |
$(":text .required" ).each(function( index, element ) { | |
var self = this; | |
var labelText = $('label[for=' + self.id + ']').text(); | |
if (element.val() == "") { | |
message("Please fill " + labelText, "#" + self.id); | |
return false; |
NewerOlder