Skip to content

Instantly share code, notes, and snippets.

ProNotion

Block or report user

Report or block ProNotion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View phil-dev-vm.boxstarter.package.ps1
######## 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
@ProNotion
ProNotion / MigrateUmbracoRedirectsToUrlTracker
Last active Jun 15, 2018
Migrates records from the umbracoRedirectUrl table to the icUrlTracker table
View MigrateUmbracoRedirectsToUrlTracker
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
@ProNotion
ProNotion / gist:878fe157ff9ff025742ca6776c0fce48
Created Jun 15, 2018
Adds ForceRedirect column to UrlTracker table
View gist:878fe157ff9ff025742ca6776c0fce48
ALTER TABLE icUrlTracker ADD ForceRedirect BIT DEFAULT 0 NOT NULL
@ProNotion
ProNotion / IIS_Sites_With_SSL.ps1
Created Feb 13, 2018
List all sites in IIS with SSL Bindings
View IIS_Sites_With_SSL.ps1
import-module WebAdministration
Write-Host "`n Listing sites with SSL bindings"
Write-Host "**********************************`n"
ls IIS:\SslBindings | Foreach {
Write-Host " - $($_.Host)"
}
Write-Host "`n**********************************"
@ProNotion
ProNotion / Purge Long Folder Structures
Last active May 12, 2016
How to Delete Files which exceed 255 Characters on Windows e.g. long filenames
View Purge Long Folder Structures
robocopy /PURGE <empty_dir> <directory_to_remove>
@ProNotion
ProNotion / gist:a2c3fdd29ab63b737f10776394978140
Created May 12, 2016
How to Delete Files which exceed 255 Characters on Windows e.g. long filenames
View gist:a2c3fdd29ab63b737f10776394978140
robocopy /PURGE <empty_dir> <directory_to_remove>
@ProNotion
ProNotion / gist:e8bd06769af087d7412fd015489312ad
Created May 12, 2016
How to Delete Files which exceed 255 Characters on Windows e.g. long filenames
View gist:e8bd06769af087d7412fd015489312ad
robocopy /PURGE <empty_dir> <directory_to_remove>
@ProNotion
ProNotion / ISO3166-Country-List-Table.sq
Created Jan 21, 2016
TSQL ISO3166 Country List Table
View ISO3166-Country-List-Table.sq
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 ******/
@ProNotion
ProNotion / ngroktunnel.bat
Last active Nov 30, 2016
Setup and start IISExpress site then open an ngrok tunnel to it and launch in default browser
View ngroktunnel.bat
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
View ngrok-with-IISExpress.md
  1. Decide on a subdomain to use with ngrok. This makes the whole process easier.
  2. Open up a Command Prompt in Administrator mode and run the following command to register the URL with HTTP.sys replacing "modernie" with your subdomain and ##### with your VisualStudio/IISExpress application's port.
netsh http add urlacl url=http://modernie.ngrok.com:##### user=everyone
  1. Edit your applicationhost.config. The easiest way to is start up the site and right-click the IISExpress icon in the System Tray. Click "Show All Applications" and select your website running at localhost:#####. Click the path next to "Config" to open the file in an editor.
  2. Search for you site's <bindings> configuration. The easiest way is to search for *:#####:localhost, which should bring you to the <bindings> section for your site. Edit them to include the following:
You can’t perform that action at this time.