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
import { useEffect, useState } from 'react'; | |
import { useLocation } from 'react-router'; | |
interface IProps { | |
key: string; | |
} | |
export function GoogleAnalytics({ key }: IProps) { | |
const location = useLocation(); |
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
@Injectable({ | |
providedIn: "root", | |
}) | |
export class ExampleAppStateService extends StateService { | |
public get company(): StateItem<CompanyModel> { | |
return this.get("company", () => new StateItem<CompanyModel>()); | |
} | |
public get project(): StateItem<ProjectModel> { | |
return this.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
import React, { useContext } from "react"; | |
const FormContext = React.createContext({ | |
obj: null, | |
events: null, | |
} as IFormContext); | |
export class FormEvents { | |
onChange?: (args: any) => void; | |
} |
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
#Issues installing on windows and running post install script | |
First, setup postgres user: | |
Run: net user postgres dbpasswordhere /add | |
Run: compmgmt.msc -> Click Local Users and Groups -> Users -> postgres ->Member of -> Add… -> Administrators -> OK | |
Run: runas /user:postgres cmd.exe -> cd \ -> postgresql-install.exe -> installed successfully without errors. Checked data folder and confirmed files created successfully. | |
Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Administrators -> Remove | |
Run: compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add… -> Power Users -> OK |
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 async Task<IPaged<Item>> Pagination(string serialisedPaginationInfo, int size) | |
{ | |
// We will fill our 'page' until it's met the pageSize or we complete our search (i.e. scan ALL records) | |
var page = new List<DM.Document>(); | |
// Get a reference to the table. Only the lower level API seems to suppot manual pagination | |
var table = Dynamo.GetTargetTable<Item>(); | |
var pagination = String.IsNullOrWhiteSpace(serialisedPaginationInfo) | |
? new PaginationInfo() |
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
-- TABLE ROW COUNTS | |
SELECT | |
[TableName] = so.name, | |
[RowCount] = MAX(si.rows) | |
FROM | |
sysobjects so, | |
sysindexes si | |
WHERE | |
so.xtype = 'U' |
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
-- GET RID OF OLD VERSIONS | |
IF OBJECT_ID('tempdb..#tmp') IS NOT NULL | |
DROP TABLE #tmp | |
Select TOP 10000 VersionID into #tmp FROM cmsDocument | |
WHERE versionID NOT IN (SELECT D.versionId FROM cmsDocument D | |
WHERE D.versionId IN (SELECT versionId FROM (SELECT CV.versionId, published, newest, RANK() OVER(ORDER BY CV.versionDate DESC) RowNum | |
FROM cmsContentVersion CV JOIN cmsDocument DD ON CV.versionId = DD.versionId | |
WHERE DD.nodeId = D.nodeId) AS tmp |
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.Linq; | |
using System.Net; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Aws | |
{ | |
public static class CacheInvalidationRequestBuilder |
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.Linq; | |
using System.Net; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Hosting; | |
using System.IO; | |
using AWSBoot.Boot; | |
using Microsoft.Extensions.Configuration; | |
using Amazon.Lambda.AspNetCoreServer.Internal; |
NewerOlder