Skip to content

Instantly share code, notes, and snippets.

View ProNotion's full-sized avatar

ProNotion

  • Prolific Notion Ltd
  • Plymouth, UK
View GitHub Profile
@ProNotion
ProNotion / gist:a2c3fdd29ab63b737f10776394978140
Created May 12, 2016 12:25
How to Delete Files which exceed 255 Characters on Windows e.g. long filenames
robocopy /PURGE <empty_dir> <directory_to_remove>
@ProNotion
ProNotion / gist:e8bd06769af087d7412fd015489312ad
Created May 12, 2016 12:25
How to Delete Files which exceed 255 Characters on Windows e.g. long filenames
robocopy /PURGE <empty_dir> <directory_to_remove>
@ProNotion
ProNotion / ISO3166-Country-List-Table.sq
Created January 21, 2016 12:01
TSQL ISO3166 Country List Table
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 November 30, 2016 19:15
Setup and start IISExpress site then open an ngrok tunnel to it and launch in default browser
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
  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: