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 https://www.npmjs.com/package/grunt-cachebuster | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
cachebuster: { | |
//appears you need a sub-task | |
'generate-hashes': { | |
options: { | |
//basedir: 'src/EHRSim.Web' | |
//basedir replacement does NOT work on windows, need to handle replacement on your own | |
formatter: function(hashes) { |
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
//All.Tests program.cs | |
public static int Main(string[] args) | |
{ | |
var basepath = "./"; | |
if (args.Length > 0) | |
{ | |
basepath = args[0]; | |
} |
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 bool IsSignatureValid(HttpRequestBase request, string oauthSecret) | |
{ | |
var context = _contextBuilder.FromHttpRequest(request); | |
//this is for when we are behind a load balancer that handles SSL duties | |
//client contacts https://oursite but load balancer directs request to http://oursite on the actual server | |
//this fundamentally changes the signature base of the request, forcing us to try validating both ways | |
var maybeSignedWithHttpsNotHttpUrlContext = _contextBuilder.FromHttpRequest(request); | |
maybeSignedWithHttpsNotHttpUrlContext.RawUri = new Uri(context.NormalizedRequestUrl.Replace("http:", "https:")); |
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
<!doctype html> | |
<html lang="us"> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery UI Example Page</title> | |
<link href="css/custom-theme/jquery-ui-1.10.1.custom.css" rel="stylesheet"> | |
<script type="text/javascript" src="js/jquery-1.7.min.js"></script> | |
<script type="text/javascript" src="js/jquery-ui-1.10.1.custom.js"></script> | |
<script> | |
$(function() { |
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.ComponentModel.DataAnnotations; | |
namespace Project.MvvmFramework.ValidationAttributes | |
{ | |
public class NullableIntegerAttribute : ValidationAttribute | |
{ | |
private readonly int _maxDigits; | |
private readonly string _propertyName; | |
const string MessageFormat = "{0} can only contain up to {1} numeric characters."; |
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
(function () { | |
$.support.placeholder = false; | |
var test = document.createElement('input'); | |
if ('placeholder' in test) { | |
$.support.placeholder = true; | |
return function () { } | |
} else { | |
return function () { | |
$(function () { | |
var active = document.activeElement; |
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 RestSharp; | |
namespace GithubTicketImporter { | |
class Program { | |
static IAuthenticator authenticator = new HttpBasicAuthenticator("uname", "pwd"); | |
static string assemblaBaseUrl = "https://www.assembla.com/spaces/BrewTelligence/"; | |
static string githubBaseUrl = "https://api.github.com/"; |
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
--desired collation for (var)char columns: | |
DECLARE @collationName VARCHAR(30) | |
SET @collationName = 'Latin1_General_CS_AI' | |
--build tables containing drop/create index queries | |
--http://www.sqlservercentral.com/scripts/Indexing/31652/ | |
SELECT | |
REPLICATE(' ',4000) AS COLNAMES , | |
OBJECT_NAME(I.ID) AS TABLENAME, | |
I.ID AS TABLEID, |
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
[Test] | |
public void Limit_Collection_Contents_Criteria() { | |
var pepperoni = new Topping { Name = "pepperoni", Type = "meat" }; | |
var cheese = new Topping { Name = "mozzarella", Type = "dairy" }; | |
var cheesePizza = new Pizza() { Crust = "deep dish", Sauce = "red" } | |
.WithTopping(cheese); | |
var pepperoniPizza = new Pizza() { Crust = "deep dish", Sauce = "red" } | |
.WithTopping(cheese) |
NewerOlder