!!! Work in progress, use at your own risk. !!!
- nginx
- certbot
- iptables
[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, |
--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 ( |
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 |
open System | |
open System.Data | |
open System.Data.Common | |
open Donald | |
// | |
// Logging | |
type LogError = | |
{ Error : exn | |
Message : string } |
module Http = | |
open System | |
open System.Net | |
open System.Net.Http | |
type RequestFailure = | |
{ Url : Uri | |
StatusCode : HttpStatusCode option | |
Message : string } |
module Log = | |
open System | |
open System.IO | |
let private logDir = "logs" | |
let private log kind fmt = | |
Printf.kprintf (fun s -> | |
let now = DateTime.Now | |
let msg = sprintf "[%s] [%s] %s" (now.ToString("s")) kind s |
<?php | |
namespace Turnpike; | |
class Controller | |
{ | |
protected $viewEngine; | |
function __construct(PhpViewEngine $viewEngine) | |
{ |
/*** fn_utc_to_edt ***/ | |
IF NOT EXISTS (SELECT 1 | |
FROM [INFORMATION_SCHEMA].[ROUTINES] | |
WHERE [ROUTINE_NAME] = 'fn_utc_to_edt' | |
AND [ROUTINE_TYPE] = 'FUNCTION') | |
BEGIN | |
EXEC('CREATE FUNCTION [dbo].[fn_utc_to_edt]() RETURNS INT AS BEGIN RETURN 1 END') | |
END; | |
GO |