Skip to content

Instantly share code, notes, and snippets.

View woeterman94's full-sized avatar

Wouter woeterman94

View GitHub Profile
@woeterman94
woeterman94 / contextmenu.reg
Created March 25, 2019 14:17
Provide command prompt en powershell in context menu
Windows Registry Editor Version 5.00
; Command Prompt
[HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd]
"MUIVerb"="Command Prompts"
"Icon"="cmd.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
[HKEY_CLASSES_ROOT\Directory\background\shell\01MenuCmd]
@woeterman94
woeterman94 / memorycache.cs
Last active February 10, 2021 16:49
memorycache
public async Task<IEnumerable<SupplyResponse>> GetSupplyWithCacheAsync()
{
return await _memoryCache.GetOrCreateAsync<IEnumerable<SupplyResponse>>(CacheKeys.ShopSupply, async cache =>
{
cache.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(30);
return await GetWebshopSupply();
});
}
"Horse" Don't trade , Don't trust
steamID: STEAM_0:1:34690691
steamID3: [U:1:69381383]
steamID64 (Dec): 76561198029647111
steamID64 (Hex): 11000010422ad07
profile http://steamcommunity.com/profiles/76561198029647111
profile state Public
profile created August 28th, 2010
---
steamID: STEAM_0:1:166975027
@woeterman94
woeterman94 / channels-be.m3u
Created October 6, 2021 08:30
channels be
#EXTM3U
#EXTINF:-1 tvg-id="ATV" tvg-name="ATV" tvg-country="BE" tvg-language="Dutch" tvg-logo="https://i.imgur.com/iWXUmje.jpg" group-title="",ATV (720p)
https://api.new.livestream.com/accounts/27755193/events/8452381/live.m3u8
#EXTINF:-1 tvg-id="BelRTL.be" tvg-name="Bel RTL" tvg-country="BE" tvg-language="French" tvg-logo="https://i.ibb.co/VmQ5bzM/5107.jpg" group-title="",Bel RTL (720p)
https://bel-lh.akamaihd.net/i/BEL_1@321282/master.m3u8
#EXTINF:-1 tvg-id="BloombergTVEMEALiveEvent.us" tvg-name="Bloomberg TV EMEA Live Event" tvg-country="EMEA" tvg-language="English" tvg-logo="http://cdn-profiles.tunein.com/s47135/images/logog.png" group-title="Business",Bloomberg TV EMEA Live Event (720p)
https://www.bloomberg.com/media-manifest/streams/eu-event.m3u8
#EXTINF:-1 tvg-id="BloombergTVEurope.us" tvg-name="Bloomberg TV Europe" tvg-country="EUR" tvg-language="English" tvg-logo="http://cdn-profiles.tunein.com/s47135/images/logog.png" group-title="Business",Bloomberg TV Europe (2160p)
https://bloomberg-bloombergtv-
@woeterman94
woeterman94 / command.bat
Created January 31, 2022 07:45
Run SQL server (2019) in docker
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=W@ffles!123" --name sqlserver -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
// username = SA
// password = W@ffles!123
@woeterman94
woeterman94 / logic app .json
Created February 22, 2022 13:51
Logic app: Copy file to another folder in FTP
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each_3": {
"actions": {
"Condition": {
"actions": {
"Copy_file": {
"inputs": {
@woeterman94
woeterman94 / address.txt
Created April 19, 2022 08:08
Eth address
0xE6b1d9C388c6A97948318891A3b63ef826D34F4A
@woeterman94
woeterman94 / validate.cs
Created May 9, 2022 09:56
Validate object in C#
/// <summary>
/// Method to run modelvalidation. Will return a bad request exception with the validation messages.
/// </summary>
/// <param name="object">The object to validate</param>
/// <exception cref="BadRequestException">400 exception including the validation messages</exception>
private void Validate(object @object)
{
var results = new List<ValidationResult>();
var valid = Validator.TryValidateObject(@object, new ValidationContext(@object), results, validateAllProperties: true);
var errorMessages = results.Select(x => x.ErrorMessage);