moved to here: https://github.com/luisrudge/install-scripts/blob/master/elementary/install.sh
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 class Authentication { | |
public const string Secret = "123@123"; | |
public static void Setup(IPipelines pipelines, Db db) { | |
var c = new StatelessAuthenticationConfiguration(ctx => { | |
var username = ctx.Request.Headers[Constants.HeaderUsername].FirstOrDefault(); | |
var hash = ctx.Request.Headers[Constants.HeaderHash].FirstOrDefault(); | |
if (String.IsNullOrEmpty(username)) { | |
return null; | |
} |
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 DbTest { | |
protected MyDbContext Db; | |
private DbConnection _connection; | |
protected abstract DbConnection DbConnection { get; } | |
[SetUp] | |
public virtual void Setup() { | |
CreateContext(true); | |
Db.Database.CreateIfNotExists(); | |
Db.Database.Initialize(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
Update-ExecutionPolicy Unrestricted | |
cinst ncrunch2.vs2013 | |
cinst resharper | |
choco install GitDiffMargin | |
Install-ChocolateyVsixPackage WebEssentials2013 http://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361/file/105627/37/WebEssentials2013.vsix | |
Install-ChocolateyVsixPackage BuildVision http://visualstudiogallery.msdn.microsoft.com/23d3c821-ca2d-4e1a-a005-4f70f12f77ba/file/95980/7/BuildVisi |
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
<aside class="sidebar"> | |
<nav class="menu"> | |
<div class="menu-item"> | |
<a href="" class="menu-item__link"> | |
<span class="menu-item__icon"> | |
<i class="ion-ios-home-outline"></i> | |
</span> | |
<span class="menu-item__text"> | |
Home | |
</span> |
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> | |
/// Recupera o relatório de questionários respondidos | |
/// </summary> | |
/// <param name="userId">Código do usuário</param> | |
/// <param name="startDate">Data de filtro: De</param> | |
/// <param name="endDate">Data de filtro: Até</param> | |
/// <param name="trainingId">Código do treinamento</param> | |
/// <returns></returns> | |
public IEnumerable<UserReportDTO> GetReports(int userId, DateTime? startDate, DateTime? endDate, string trainingId) | |
{ |
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
--tamanho da página | |
DECLARE @PageSize INT | |
SET @PageSize = 25 | |
--Índice da página (começa em 1) | |
DECLARE @Page INT | |
SET @Page = 4 | |
--Índice do primeiro registro a ser exibido (não precisa ser um parâmetro, pode ser calculado internamente) | |
DECLARE @PageStartIndex INT | |
SET @PageStartIndex = ((@Page - 1) * @PageSize); --qual o primeiro registro da página |
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 IDomainEntity | |
{ | |
object Id { get; set; } | |
} | |
public interface IRepository<T> : IDisposable where T : IDomainEntity | |
{ | |
IQueryable<T> GetAll(); | |
IQueryable<T> Query(string sql, params object[] args); | |
IQueryable<T> PagedQuery(long pageNumber, long pageSize, string sql, params object[] args); |
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
/// <reference path="../ts/sammyjs-0.7.d.ts" /> | |
/// <reference path="../ts/jquery-1.8.d.ts" /> | |
/// <reference path="../ts/knockout-2.2.d.ts" /> | |
/// <reference path="bootstrapper.ts" /> | |
module dashboard { | |
export class queryParameters { | |
constructor (campaignId: string, interval: string, date?: Date, from?: Date, to?: Date) { | |
this.campaignId = campaignId; | |
this.interval = interval; |
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
var dashboard; | |
(function (dashboard) { | |
var queryParameters = (function () { | |
function queryParameters(campaignId, interval, date, from, to) { | |
this.campaignId = campaignId; | |
this.interval = interval; | |
this.date = date; | |
this.from = from; | |
this.to = to; | |
} |
OlderNewer