Skip to content

Instantly share code, notes, and snippets.

View odenijs's full-sized avatar
🏠

Okke de Nijs odenijs

🏠
View GitHub Profile
@model UmbracoLogin.MemberLoginModel
@if (User.Identity.IsAuthenticated)
{
<p>Logged in: @User.Identity.Name</p>
<p>@Html.ActionLink("Log out", "MemberLogout", "MemberLoginSurface")</p>
}
else
{
using (Html.BeginUmbracoForm("MemberLogin", "MemberLoginSurface"))
{
@odenijs
odenijs / Email Server (Windows Only).md
Created September 5, 2016 20:12 — forked from raelgc/Email Server (Windows Only).md
Setup a Local Only Email Server (Windows Only)
@odenijs
odenijs / ProxyForFiddler.config
Created May 16, 2019 13:15 — forked from michaellwest/ProxyForFiddler.config
Snippet to be added in the web.config, app.config, or machine.config to redirect traffic to the Fiddler proxy.
<system.net>
<defaultProxy enabled = "true" useDefaultCredentials = "true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
</defaultProxy>
</system.net>
@odenijs
odenijs / UnusedMediaItems.ps1
Created April 16, 2021 16:07 — forked from michaellwest/UnusedMediaItems.ps1
Sitecore PowerShell script to locate media items without reference to any other item.
<#
.SYNOPSIS
Lists all media items that are not linked to other items.
.NOTES
Michael West
#>
# HasReference determines if the specified item is referenced by any other item.
function HasReference {
@odenijs
odenijs / removeOlderThanDays.sh
Created April 21, 2021 15:08 — forked from hatifnatt/removeOlderThanDays.sh
Simple script to delete files older than specific number of days from FTP
#!/bin/bash
# Simple script to delete files older than specific number of days from FTP. Provided AS IS without any warranty.
# This script use 'lftp'. And 'date' with '-d' option which is not POSIX compatible.
# FTP credentials and path
FTP_HOST="ftp.host.tld"
FTP_USER="usename"
FTP_PASS="password"
FTP_PATH="/ftp/path"
# Full path to lftp executable
@odenijs
odenijs / UpdateIISExpressSSLForChome.ps1
Created October 7, 2021 10:59 — forked from blowdart/UpdateIISExpressSSLForChome.ps1
IIS Express certs (for now) don't contain SAN strings. This makes Chrome unhappy. Make Chrome happy again with a new organic, artisanal, gluten free HTTPS certificate.
# Create a new self signed HTTPS Certificate for IIS Express
# Crafted with all organic, GMO, gluten free ingreditations
# with an artisinal SAN to make Chrome 58 onwards happy.
#
# See https://bugs.chromium.org/p/chromium/issues/detail?id=308330
#
# Run this at an administrative PowerShell prompt.
#
# You will be prompted to trust a new certificate via a windows dialog.
# Click yes otherwise Visual Studio will not be able to determine your
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'windows-latest'