#Include folder on publish#
the folder is not included in the main project Source for this snipset is Umbraco Deplyment .target file.
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
namespace FixDocumentTypeFuckUP |
with c (UniqueId) as | |
( | |
select UniqueId from cmsLanguageText | |
group by UniqueId | |
having count(1) > 2 | |
) | |
select | |
'delete from cmsLanguageText where UniqueId = ''' +cast( l.UniqueId as varchar(max)) + ''' and pk != '+cast( min(l.pk) as varchar(max)) +' and languageId = '+ cast(l.languageId as varchar(max)) +';', | |
l.UniqueId, l.value,l.languageId, min(l.pk) as pk, count(1) as Count | |
from cmsLanguageText l |
private static int GetArrayIndexFromUtc(int length, int frameTimeout) | |
{ | |
var slides = length; | |
var slideDuration = frameTimeout; | |
var frameSegment = slideDuration * slides; | |
var currentDateTime = DateTime.Now; | |
var baseDateTime = new DateTime(currentDateTime.Year, currentDateTime.Month, currentDateTime.Day, 0, 0, 0, 0); | |
var ticks = (currentDateTime - baseDateTime).TotalMilliseconds; |
#!/bin/sh | |
#Remove all folders that you need to remove. | |
git filter-branch -f --tree-filter "rm -fr */App_Data/*" --prune-empty --tag-name-filter cat HEAD | |
#Run GC cleanup of references. | |
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
#Force push to origin | |
git push origin --force |
find . -type f -mtime -10 -ls | grep -v ".lock\|.jpg\|.cache\|report\|.pdf\|.png\|.txt\|.sql\|proc\|newrelic\|.map\|udev\|kernel\|sys/\|.log\|run/\|/apt" |
void Main() | |
{ | |
var locaTime = DateTime.Now; | |
IServiceSyncedTime ts = new SyncDateTime(new NAVTimeService()); | |
locaTime.Dump(); | |
Thread.Sleep(5000); |
git archive -o .zip [id] $(git diff-tree --no-commit-id --name-only -r [id]) |
TRUNCATE TABLE umbracoLog | |
GO | |
TRUNCATE TABLE umbracoUser2NodePermission | |
GO | |
-- Create a temporary table for all documents which are published and not in the recycle bin | |
CREATE TABLE #Nodes (id int) | |
-- Delete all rows if the table exists before | |
TRUNCATE TABLE #Nodes |
#Include folder on publish#
the folder is not included in the main project Source for this snipset is Umbraco Deplyment .target file.
git checkout --orphan newBranch | |
git add -A # Add all files and commit them | |
git commit | |
git branch -D master # Deletes the master branch | |
git branch -m master # Rename the current branch to master | |
git push -f origin master # Force push master branch to github |