Skip to content

Instantly share code, notes, and snippets.

View MrModest's full-sized avatar

Kamil MrModest

View GitHub Profile
@MrModest
MrModest / docker-compose.yml
Created September 11, 2021 19:23
Example docker-compose config
version: "3.9"
services:
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
using System;
namespace YourDomenName
{
public readonly struct Optional<TValue> where TValue : notnull
{
private readonly TValue? _value;
public static Optional<TValue> None { get; } = new (default, false);
@MrModest
MrModest / DictionaryWithCustomDefaultValue.cs
Last active May 31, 2018 15:46
Implementation for IDictionary with custom default value if key doesn't exist
//Author: John Sonmez | https://stackoverflow.com/users/45365 | https://github.com/jsonmez
//Source: https://stackoverflow.com/a/7061653/7422280
//GitHub: https://github.com/jsonmez/Defaultable-Dictionary
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace DefaultableDictionary
@MrModest
MrModest / UML.json
Last active November 27, 2017 18:19
[{
"Modifier": "publicMod",
"Name": "Angle",
"FullName": "Tetris.Angle",
"Namespace": "Tetris",
"BaseClass": null,
"Attributes": [{
"Modifier": "publicMod",
"IsConstant": false,
"IsStatic": false,
@MrModest
MrModest / Chan&IdolSankakuVideoHelper.user.js
Last active July 11, 2018 14:44
Resize HTML5 Player's width, disable autoplay, show control panel, set volume in 1%.
// ==UserScript==
// @name Chan & Idol Sankaku Video Helper
// @name:ja Chan & Idol Sankaku Video Helper
// @name:ru Chan & Idol Sankaku Video Helper
// @namespace https://www.sankakucomplex.com/
// @version 1.1.2
// @description Resize HTML5 Player's width, disable autoplay, show control panel, set volume in 1%.
// @description:ja Resize HTML5 Player's width, disable autoplay, show control panel, set volume in 1%.
// @description:ru Уменьшает ширину плеера до 1000, отключает автовоспроизведение, показывает панель навигации, устанавливает громкость в 1%.
// @author MrModest