Skip to content

Instantly share code, notes, and snippets.

View luuksommers's full-sized avatar

Luuk Sommers luuksommers

View GitHub Profile
@luuksommers
luuksommers / .gitlab-ci.yml
Created May 31, 2022 18:50
Gitlab CI dotnet iis
# This file shows how to setup the template for your projects
include:
- project: 'templates'
file: 'gitlab-templates/dotnet-framework.v1.gitlab-ci.yml'
variables:
ENABLE_UNITTESTS: 'true'
DEFAULT_IIS_SITENAME: "my-awesome-deployment.nl" # For dev deploys this gets prefixed with 'development.', for prod it gets prefixed with 'www.'
DEFAULT_DEVELOPMENT_URL: "https://my-awesome-deployment.devserver.nl/"
DEFAULT_PRODUCTION_URL: "https://www.my-awesome-deployment.nl/"
@luuksommers
luuksommers / .gitattibutes
Last active February 24, 2021 12:55
Umbraco ModelsBuilder .gitattributes
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
@luuksommers
luuksommers / Sxa.Patch.Core.config
Created October 25, 2018 11:59
Patch default core name of sxa in solr
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"
xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
<sitecore search:require="Solr">
<contentSearch>
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
<indexes hint="list:AddIndex">
<index id="sitecore_sxa_master_index">
<param desc="core">{othername}_sxa_master_index</param>
</index>
@luuksommers
luuksommers / transform-xml.ps1
Created May 25, 2018 11:39 — forked from sayedihashimi/transform-xml.ps1
Script which can be used to transform an XML file using XDT. All you need to do is download the script and call it. The script will download the files it needs to run.
<#
.SYNOPSIS
You can use this script to easly transform any XML file using XDT.
To use this script you can just save it locally and execute it. The script
will download it's dependencies automatically.
#>
[cmdletbinding()]
param(
[Parameter(
Mandatory=$true,
@luuksommers
luuksommers / MemoryMapAccessor.cs
Created March 6, 2015 09:46
Custom MemoryMapAccessor
public unsafe class MemoryMapAccessor : IDisposable
{
const long ChunkSize = 1 << 20; // 1MByte
const long ChunkSizeModMask = ChunkSize - 1; // mask for taking modulo
private FileInfo fi;
private long _size; // the file size in bytes
private long _chunkCount; // number of anticipated chunks
private bool[] _chunkLoaded = null;
@luuksommers
luuksommers / gist:7181864
Created October 27, 2013 13:12
Monitor IP changes with Python and Pushover
import re
import os
import uuid
import json
import socket
import urllib, urllib2
import time
def get_current_ip():
req = urllib2.Request('http://checkip.dyndns.org/')