Skip to content

Instantly share code, notes, and snippets.

View sotirisf's full-sized avatar

Sotiris Filippidis sotirisf

View GitHub Profile
@enkelmedia
enkelmedia / gist:5e7c242d08d8af6b7b3149af2e952ab2
Last active September 17, 2019 14:15
ModelsBuilderMock.cs
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text.RegularExpressions;
using Moq;
using Umbraco.Core.Models;
using Umbraco.ModelsBuilder;
namespace Obviuse.Tests
@jamescoxhead
jamescoxhead / UmbracoUnusedDatatypes.sql
Last active November 23, 2016 12:59
Lists Umbraco datatypes which haven't been used on document types. Care is needed if using packages like Archetype as this script will show datatypes as unused if they are only used on an archetype.
SELECT distinct [nodeId]
FROM [cmsDataType]
EXCEPT
SELECT distinct dataTypeId
FROM [cmsPropertyType]
@leekelleher
leekelleher / cmsContentType_Usage.sql
Last active January 19, 2024 19:03
Umbraco - database analysis - SQL Queries
-- Copied from Hendy https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/72814-creating-a-list-of-unused-doc-types#comment-233729
-- Find all unused docTypes
-- These results may contain docTypes that are masters of used ones, so need to exclude these too...
SELECT
A.nodeId as 'DocTypeId',
B.text AS 'Name',
A.alias AS 'Alias'
FROM
cmsContentType A LEFT JOIN
@arnold-almeida
arnold-almeida / Files changed since last tag
Created October 14, 2009 04:43
GIT: Files changed since last tag
#!/bin/bash
unset GIT_DIR
cd /path/to/project
# Get our info....
LATEST_TAG=$(git describe --tags --abbrev=0)
CURRENT_REVISION=$(git describe)
NUMBER_FILES_CHANGED=$(git diff --name-only HEAD $LATEST_TAG | wc -l)
#FILES_CHANGED=$(git diff --name-only HEAD $LATEST_TAG)