Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Weeteling brianweet

  • Amsterdam, Netherlands
View GitHub Profile
@brianweet
brianweet / OrderLineItemRecord.cs
Created Apr 29, 2020
Implementing a custom reporting service for Episerver commerce
View OrderLineItemRecord.cs
using CsvHelper.Configuration.Attributes;
using System;
namespace EPiServer.Reference.Commerce.Site.Infrastructure.Reporting
{
public class OrderLineItemRecord
{
[Name("Line Item Id")]
public int LineItemId { get; set; }
@brianweet
brianweet / BynderAssetMetaDataMapper.cs
Last active Feb 13, 2020
BynderAssetMetaDataMapper.cs
View BynderAssetMetaDataMapper.cs
using System;
using System.Collections.Generic;
using Bynder.ContentTypes;
using Newtonsoft.Json.Linq;
namespace Bynder
{
// This is the default metadata mapper, you can use it as a base class or replace it
public class BynderAssetMetaDataMapper : IBynderAssetMetaDataMapper
{
@brianweet
brianweet / cleanupazureblobs.cs
Created Jul 31, 2017
Cleanup azure blobs epi (UNTESTED!)
View cleanupazureblobs.cs
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using EPiServer.PlugIn;
using EPiServer.ServiceLocation;
using EPiServer.Web;
using EPiServer.Framework.Blobs;
using EPiServer.Azure.Blobs;
@brianweet
brianweet / orange-pi-script.txt
Created Sep 10, 2016
orange pi setup script
View orange-pi-script.txt
#!/bin/bash
## This script is developed from my Raspberry Pi script - for the Orange Pi PC
## But see the blog - you have to use a particular version of Debian
## and scripts - then expand, reboot and use this script having given it execute
## permissions. See http://tech.scargill.net/orange-pi-pc-battle-of-the-pis/
## Latest updates removing need for some manual work - thanks to Antonio Fragola.
# Get time as a UNIX timestamp (seconds elapsed since Jan 1, 1970 0:00 UTC)
startTime="$(date +%s)"
View LetsEncrypt.ps1
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1
$domain = "mydomain.com"
$certificiatePassword = "abcd1234"
$email = "letsencrypt@mydomain.com"
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $vault
cd $vault
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/
New-ACMERegistration -Contacts mailto:$email
@brianweet
brianweet / gist:067a152ed8e8233a414c
Last active Aug 29, 2015
Iphone availability response
View gist:067a152ed8e8233a414c
{
"d":{
"__type":"UGC.Logic.Web.ResponseMessage",
"Success":true,
"ResponseHeader":"Success",
"ResponseBody":"",
"ReturnData":[
{
"StartHour":10,
"StartMinute":0,
You can’t perform that action at this time.