Skip to content

Instantly share code, notes, and snippets.

View oledid's full-sized avatar
😃
On duty

Ole Morten Didriksen oledid

😃
On duty
View GitHub Profile
@oledid
oledid / refresh-path.ps1
Last active September 24, 2015 07:16
PowerShell: Refresh process PATH from machine and user PATHs
# place this script in a place which will always be in the PATH
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
@oledid
oledid / web.config
Created June 19, 2015 10:10
IIS Redirect HTTP to HTTPS
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
@oledid
oledid / web.config
Created June 19, 2015 09:37
IIS Add headers to disable client-side caching for static file
<?xml version="1.0"?>
<configuration>
<location path="index.html">
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache, no-store, must-revalidate" />
<add name="Pragma" value="no-cache" />
<add name="Expires" value="0" />
</customHeaders>