<?php
$db = new Turnpike\Db($dsn, DB_USER, DB_PASS);
$viewEngine = new Turnpike\PhpViewEngine(TEMPLATE_ROOT);
$router = new Turnpike\Router;
// Middleware
$router->Run(function (Turnpike\Request $req, Turnpike\Response $res) {
This file contains hidden or 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 LinkHeader | |
| { | |
| public string FirstLink { get; set; } | |
| public string PrevLink { get; set; } | |
| public string NextLink { get; set; } | |
| public string LastLink { get; set; } | |
| public static LinkHeader LinksFromHeader(string linkHeaderStr) | |
| { | |
| LinkHeader linkHeader = null; |
This file contains hidden or 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
| USE master | |
| GO | |
| IF OBJECT_ID('dbo.calendar') IS NOT NULL | |
| DROP TABLE dbo.calendar; | |
| IF OBJECT_ID('dbo.fn_generate_calendar') IS NOT NULL | |
| DROP FUNCTION dbo.fn_generate_calendar; | |
| GO |
This file contains hidden or 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
| [CmdletBinding()] | |
| param ( | |
| [Parameter(Mandatory = $true, HelpMessage = "The path to the project")] | |
| [String] | |
| $Project, | |
| [Parameter(Mandatory = $true, HelpMessage = "The .NET Runtime Identifier")] | |
| [ValidateSet("win-x64")] | |
| [String] | |
| $Rid, |
This file contains hidden or 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 TABLE IF EXISTS calendar; | |
| --CREATE TABLE calendar AS | |
| WITH RECURSIVE dates_cte (dt) AS ( | |
| VALUES('1970-01-01') -- Choose a start date | |
| UNION ALL | |
| SELECT date(dt, '+1 day') | |
| FROM dates_cte | |
| WHERE dt < '2050-12-31' -- Choose an end date | |
| ), | |
| calendar_cte AS ( |
This file contains hidden or 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 System.Reflection; | |
| namespace Project.Repo | |
| { | |
| public interface IMapper<TEntity> where TEntity : class | |
| { | |
| IEnumerable<PropertyInfo> Properties { get; } | |
| Type Type { get; } |
This file contains hidden or 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
| open System | |
| open System.Text | |
| [<AbstractClass; Sealed>] | |
| type StringBuilderCache private () = | |
| // The value 360 was chosen in discussion with performance experts as a compromise between using | |
| // as litle memory (per thread) as possible and still covering a large part of short-lived | |
| // StringBuilder creations on the startup path of VS designers. | |
| [<Literal>] | |
| static let _maxBuilderSize = 360 |
This file contains hidden or 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
| open System | |
| open System.Data | |
| open System.Data.Common | |
| open Donald | |
| // | |
| // Logging | |
| type LogError = | |
| { Error : exn | |
| Message : string } |
NewerOlder