Skip to content

Instantly share code, notes, and snippets.

View asiqq23's full-sized avatar

Adrian Zawadzki asiqq23

View GitHub Profile
@asiqq23
asiqq23 / Umbraco - Delete Older Versions.sql
Created February 5, 2019 20:43 — forked from enkelmedia/Umbraco - Delete Older Versions.sql
Remove older content versions from the Umbraco database (tested on v7.9.2)
/*
This SQL will clean up older versions of content from the umbraco database. Note that that the "tmp.RowNum"-condition
is used to set the number of versions to keep for each content node this can be changed if needed.
Note 2: If you have lots of versions (like we had) you might need to execute the delete-statements with a offset/fetch-setup in steps.
*/
IF OBJECT_ID('tempdb..#tmp') IS NOT NULL DROP TABLE #tmp
Select VersionID into #tmp FROM cmsDocument
@asiqq23
asiqq23 / k8s-pi.md
Created December 28, 2018 14:51 — forked from alexellis/k8s-pi.md
K8s on Raspbian
TRUNCATE TABLE umbracoLog
GO
TRUNCATE TABLE umbracoUser2NodePermission
GO
TRUNCATE TABLE umbracoUserLogins
GO
-- Create a temporary table for all documents which are published and not in the recycle bin
CREATE TABLE #Nodes (id int)
GO
@asiqq23
asiqq23 / umbraco db cleanup.sql
Created November 19, 2018 21:51 — forked from dampee/umbraco db cleanup.sql
Umbraco Database cleanup. After pulling in an umbraco database from production, you don't need all history or log.
-- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance
-- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/
DECLARE @createdDate Datetime = DATEADD(m, -1, getdate())
-- dump logs
-- TRUNCATE TABLE umbracolog -- faster if log table is very big and you don't need anything
DELETE FROM umbracolog WHERE Datestamp < @createdDate
-- clean up old versions
DELETE FROM cmsPropertyData WHERE
public static class Dispatcher
{
public static readonly Dictionary<ActionType, Func<IPublishable, Task>> _ = new Dictionary<ActionType, Func<IPublishable, Task>>
{
{
ActionType.ActionA, async p =>
{
await Task.Delay(1);
Console.WriteLine(p.Identifier);
}
//gets all achors on page ang joins git clone command with repo url
var repos = $("a.execute")
var cloneCmd = "";
for (var i = 0; i < repos.length; i++) {
cloneCmd += "git clone " + dd[i].href + " && ";
}
FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out