Skip to content

Instantly share code, notes, and snippets.

View brianweet's full-sized avatar

Brian Weeteling brianweet

  • Amsterdam, Netherlands
View GitHub Profile
@brianweet
brianweet / reference-links.md
Created February 24, 2023 09:48
Reference links
@brianweet
brianweet / OrderLineItemRecord.cs
Created April 29, 2020 10:27
Implementing a custom reporting service for Episerver commerce
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 February 13, 2020 10:00
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 July 31, 2017 06:52
Cleanup azure blobs epi (UNTESTED!)
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 September 10, 2016 15:08
orange pi setup script
#!/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)"
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 August 29, 2015 14:17
Iphone availability response
{
"d":{
"__type":"UGC.Logic.Web.ResponseMessage",
"Success":true,
"ResponseHeader":"Success",
"ResponseBody":"",
"ReturnData":[
{
"StartHour":10,
"StartMinute":0,