This file contains 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
internal static string GetModelPropertyTypeAlias<TModel>(Expression<Func<TModel, object>> selector) | |
where TModel : PublishedElementModel | |
{ | |
Expression body = selector.Body; | |
// Unwrap conversions, if any | |
if (body is UnaryExpression unaryExpression && unaryExpression.NodeType == ExpressionType.Convert) | |
body = unaryExpression.Operand; | |
if (!(body is MemberExpression memberExpression)) |
This file contains 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
SELECT m.LoginName, m.Email, cmsPropertyData.dataDate AS LastLoginDate | |
FROM cmsPropertyType INNER JOIN | |
cmsPropertyData ON | |
cmsPropertyType.id = cmsPropertyData.propertytypeid RIGHT OUTER JOIN | |
cmsMember AS m ON cmsPropertyData.contentNodeId = m.nodeId | |
WHERE (cmsPropertyType.Alias = N'umbracoMemberLastLogin') AND (cmsPropertyData.dataDate IS NOT NULL) | |
ORDER BY LastLoginDate DESC |
This file contains 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
######## Phil's dev VM boxstarter script ######## | |
############### | |
#### NOTES #### | |
############### | |
## After a restart/reconnect, even though it shows the login screen, boxstarter is still working | |
### NOTES when kicking off remotely from host to VM, fails on Configuring CredSSP settings | |
## check http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/30/understanding-powershell-remote-management.aspx |
This file contains 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
PRINT 'Checking for existence of table ''countries''' | |
/****** Object: Table [dbo].[Countries] Script Date: 11/09/2006 16:58:01 ******/ | |
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Countries]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) | |
drop table [dbo].[Countries] | |
PRINT 'Existing table ''countries'' dropped!' | |
GO | |
/****** Object: Table [dbo].[Countries] Script Date: 11/09/2006 16:58:01 ******/ |
This file contains 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
INSERT INTO [icUrlTracker] (OldUrl, RedirectNodeId, Notes) | |
SELECT | |
RIGHT(url, LEN(url) - 1), | |
(SELECT TOP (1) | |
id | |
FROM umbracoNode | |
WHERE (uniqueID = umbracoRedirectUrl.contentKey)) | |
AS NodeId, | |
'Import from umbracoRedirectUrl table' AS Note | |
FROM umbracoRedirectUrl |
This file contains 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
ALTER TABLE icUrlTracker ADD ForceRedirect BIT DEFAULT 0 NOT NULL |
This file contains 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-module WebAdministration | |
Write-Host "`n Listing sites with SSL bindings" | |
Write-Host "**********************************`n" | |
ls IIS:\SslBindings | Foreach { | |
Write-Host " - $($_.Host)" | |
} | |
Write-Host "`n**********************************" |
This file contains 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
rem ********************************************************************* | |
rem This bat file will SETup a site in IIS Express, open a tunnel with ngrok and launch | |
rem the site in the users default web browser | |
rem | |
rem tunnel.bat Path SiteName | |
rem - Path The path to the root folder for the site | |
rem - SiteName The name of the site to use for the tunnel and in IIS Express site | |
rem *********************************************************************** | |
@echo off |
This file contains 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
robocopy /PURGE <empty_dir> <directory_to_remove> |
This file contains 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
robocopy /PURGE <empty_dir> <directory_to_remove> |
NewerOlder