Skip to content

Instantly share code, notes, and snippets.

Avatar

Ronald Rink dfch

View GitHub Profile
@dfch
dfch / HttpClient.cs
Last active Mar 23, 2021
HttpClient and how to use Headers, Content-Type and PostAsync
View HttpClient.cs
// HttpClient and how to use Headers, Content-Type and PostAsync
// http://d-fens.ch/2014/04/12/httpclient-and-how-to-use-headers-content-type-and-postasync/
// Copyright 2014-2015 Ronald Rink, d-fens GmbH
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
@dfch
dfch / ODataQueryOptionsExtensions.cs
Last active Feb 10, 2021
ODataQueryOptionExtensions - Modifying ODataQueryOptions on the fly - https://d-fens.ch/2017/02/26/modifying-odataqueryoptions-on-the-fly/
View ODataQueryOptionsExtensions.cs
/**
* Copyright 2017 d-fens GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View MixPre-3 II X-Keys XK-24 PhoneCall Configuration
'=↓=↓=↓= MW3 Header Start =↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=[MWTAG1]
' Script Type: MacroWorks 3 Device Script
' Device Name: X-keys XK-24
' Device Description: 24 Button HID Controller
' Script Name: XK-24
' Script Description: Macros for XK-24 [MWTAG19]
' PID: 1029
' Firmware: π3 V 28
' MW3 Version: 15
' Script Language: Visual Basic
@dfch
dfch / ### Sending Gelf messages to Graylog2 via PowerShell.md
Last active May 5, 2020
Sending Gelf messages to Graylog2 via PowerShell
View ### Sending Gelf messages to Graylog2 via PowerShell.md
@dfch
dfch / ### PowerShell modules, digital signatures, NuGet nuspec and packages.md
Last active Oct 29, 2019
PowerShell modules, digital signatures, NuGet nuspec and packages
View ### PowerShell modules, digital signatures, NuGet nuspec and packages.md

PowerShell modules, digital signatures, NuGet nuspec and packages

d-fens GmbH General-Guisan-Strasse 6 CH-6300 Zug Switzerland

@dfch
dfch / ComRegistration.cs
Created Aug 21, 2019
Sparx Enterprise Architect Registration of ActiveX Controls under HKEY_CURRENT_USER
View ComRegistration.cs
public class ComRegistration
{
private const string DEFAULT_VALUE = "";
private const char BACKSLASH = '\\';
private const string HKEY_SOFTWARE_CLASSES = @"SOFTWARE\Classes\";
private const string HKEY_SOFTWARE_WOW_CLSID = @"Software\Classes\WOW6432Node\CLSID\";
private const string IMPLEMENTED_CATEGORY_DOTNET = @"Implemented Categories\\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}";
private const string THREADING_MODEL = "ThreadingModel";
@dfch
dfch / Boxed.cs
Last active Aug 21, 2019
Converting ODataQueryOptions into LINQ Expressions in C#
View Boxed.cs
/**
* Copyright 2017 d-fens GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@dfch
dfch / BaselineComparison.cs
Created Aug 11, 2019
Handling Sparx Enterprise Architect Baseline Information
View BaselineComparison.cs
/**
* Copyright 2018 d-fens GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View HubFactory.cs
/**
* Copyright 2017 d-fens GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@dfch
dfch / RepositorySingleton.cs
Last active Oct 13, 2018
Simplifying Sparx Enterprise Architect Development with C# Interactive (CSI)
View RepositorySingleton.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;
using System.Threading;
namespace biz.dfch.CS.EA.ProductModeler.Tests.Repository
{
public class RepositorySingleton : IDisposable