Skip to content

Instantly share code, notes, and snippets.

View Bert-Proesmans's full-sized avatar

Proesmans Bert Bert-Proesmans

View GitHub Profile
configVerCode=202207300
ampFactor=
battStatusWorkaround=true
capacity=(5 60 55 60 auto false)
cooldownCurrent=
cooldownRatio=(50 10)
currentWorkaround=false
dischargePolarity=-
forceOff=true
configVerCode=202206010
capacity=(5 60 55 60 false false)
temperature=(40 45 90 55)
cooldownRatio=(50 10)
cooldownCurrent=
cooldownCustom=()
@Bert-Proesmans
Bert-Proesmans / Grouping.snip.cs
Created August 12, 2020 09:30
DynamicDataToy extended examples
private readonly SalesOptions.Load.Handler _optionsService;
private readonly SourceCache<SalesOption, ArticleCode> _salesOptionsSource;
private readonly ReadOnlyObservableCollection<SalesOptionGroup> _groupedSalesOptions;
private readonly ReadOnlyObservableCollection<SalesOptionProxy> _salesOptionProxies;
private readonly IDisposable _cleanup;
public WindowViewModel(SalesOptions.Load.Handler optionsService)
{
_optionsService = optionsService;
@Bert-Proesmans
Bert-Proesmans / gist:0b8fdc80be9186d6f815b73b587fd975
Last active May 25, 2020 14:39
outlook main window messages
<000001> 00010928 P WM_DWMCOLORIZATIONCOLORCHANGED clrNew:E35C3B0F fBlended:True
<000002> 00010928 P WM_DWMCOLORIZATIONCOLORCHANGED clrNew:E35C3B0F fBlended:True
<000003> 00010928 P WM_DWMCOLORIZATIONCOLORCHANGED clrNew:E35C3B0F fBlended:True
<000004> 00010928 P WM_WTSSESSION_CHANGE nStatusCode:WTS_SESSION_LOCK nSessionID:1
<000005> 00010928 P WM_DWMCOLORIZATIONCOLORCHANGED clrNew:E35C3B0F fBlended:True
<000006> 00010928 P WM_DWMCOLORIZATIONCOLORCHANGED clrNew:E35C3B0F fBlended:True
<000007> 00010928 S WM_SETTINGCHANGE wFlag:0000 pszMetrics:01EEDDC8
<000008> 00010928 S WM_WINDOWPOSCHANGING lpwp:01FEF22C
<000009> 00010928 R WM_WINDOWPOSCHANGING
@Bert-Proesmans
Bert-Proesmans / main.rs
Created May 3, 2020 15:18
Amethyst XZ plane floor test, orthographic camera
use amethyst::{
core::transform::TransformBundle,
prelude::*,
renderer::{
plugins::{RenderFlat2D, RenderFlat3D, RenderToWindow},
types::DefaultBackend,
RenderingBundle,
},
utils::application_root_dir,
};
@Bert-Proesmans
Bert-Proesmans / test.cs
Last active January 10, 2020 08:57
EntityFramework and async
namespace Test {
static async Task ExecuteWithChangedEntitiesInnerAwait<T>(Func<IEnumerable<T, Task>> handling) {
using(var ctxt = _ctxtFactory()) {
var entities = ctxt.Set<T>();
await handling(entities);
}
}
static Task ExecuteWithChangedEntitiesNoAwait<T>(Func<IEnumerable<T, Task>> handling) {
using(var ctxt = _ctxtFactory()) {
@Bert-Proesmans
Bert-Proesmans / loadingcontrol.cs
Created November 19, 2019 13:21
Loading custom control
public class LoadingControl : UserControl
{
public static readonly DependencyProperty TaskHandlerProperty =
DependencyProperty.Register(nameof(TaskHandler), typeof(ITaskHandler), typeof(Loading),
new FrameworkPropertyMetadata(""));
public Loading()
{
InitializeComponent();
}
@Bert-Proesmans
Bert-Proesmans / context.cs
Last active October 7, 2019 13:07
EF DateTime formatting example
public IQueryable<HistoryItemContract> FetchNoLinqKit(DateTime? createdAfter, DateTime? createdBefore)
{
var data = HistorySet
.Join(HistoryLinkSet, (x) => x.HISTORYID, (hl) => hl.HISTORYID, (x, hl) => new { x, hl })
.Join(ContactSet, (x) => x.hl.CONTACTID, (c) => c.ID, (x, c) => new { x, c });
if (createdAfter.HasValue)
{
// WARN; We assume the value is never NULL!
data = data.Where(x => x.x.x.CREATEDATE >= createdAfter.Value);
@Bert-Proesmans
Bert-Proesmans / qos-all.auto.rsc
Last active January 25, 2024 06:18
Mikrotik Routerboard QOS script
# Creation Date: November 3, 2018
:local Version "2.0"
:local LASTUPDATE "05/10/2019"
# Tested with RouterOS 6.43.4
#
# Mikrotik script to implement QoS on internet connections.
# The script makes use of Address Lists, Firewall rules (Mangle) for connection tagging, and Queue Trees.
# The script will remove applied rules from previous runs before applying.
#
@Bert-Proesmans
Bert-Proesmans / README.md
Created February 8, 2019 20:14
Grim Fandango Remastered, The Bard's Tale, InnerSpace - Playstation key

I bought the Indie Humble Playstation Bundle 2019 but do not have a PSN account in the following eligible countries. I bought the bundle because of the soundtracks, not the games per se.

I'm giving away my key to the first eligible person reading this gist-file. I'm guessing non-eligible accounts simply cannot redeem the code and it will stay valid for the next person to try. (I haven't tried myself)

If you would like to add Grim Fandango Remastered, The Bard's Tale and InnerSpace to your game collection; here you go.

9GEA-78N2-HL8R